-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,38 @@ | ||
name: Tests CI | ||
|
||
env: | ||
# Setting an environment variable with the value of a configuration variable | ||
env_var: ${{ vars.ENV_CONTEXT_VAR }} | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
- release/* | ||
- feature/* | ||
env: | ||
# Setting an environment variable with the value of a configuration variable | ||
env_var: ${{ vars.ENV_CONTEXT_VAR }} | ||
|
||
jobs: | ||
display-variables: | ||
name: ${{ vars.JOB_NAME }} | ||
# You can use configuration variables with the `vars` context for dynamic jobs | ||
if: ${{ vars.USE_VARIABLES == 'true' }} | ||
runs-on: ${{ vars.RUNNER }} | ||
environment: ${{ vars.ENVIRONMENT_STAGE }} | ||
build: | ||
|
||
name: Jest | ||
runs-on: ubuntu-20.04 # using higher versions of ubuntu will cause an issue with MongoDB | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
|
||
steps: | ||
- name: Use variables | ||
run: | | ||
echo "repository variable : $REPOSITORY_VAR" | ||
echo "organization variable : $ORGANIZATION_VAR" | ||
echo "overridden variable : $OVERRIDE_VAR" | ||
echo "variable from shell environment : $env_var" | ||
env: | ||
REPOSITORY_VAR: ${{ vars.REPOSITORY_VAR }} | ||
ORGANIZATION_VAR: ${{ vars.ORGANIZATION_VAR }} | ||
OVERRIDE_VAR: ${{ vars.OVERRIDE_VAR }} | ||
|
||
- name: ${{ vars.HELLO_WORLD_STEP }} | ||
if: ${{ vars.HELLO_WORLD_ENABLED == 'true' }} | ||
uses: actions/hello-world-javascript-action@main | ||
with: | ||
who-to-greet: ${{ vars.GREET_NAME }} | ||
|
||
|
||
- name: Log Environment Variables | ||
run: | | ||
echo "COVERAGE_STATEMENTS=${{ vars.COVERAGE_STATEMENTS }}" | ||
echo "COVERAGE_BRANCHES=${{ vars.COVERAGE_BRANCHES }}" | ||
echo "COVERAGE_FUNCTIONS=${{ vars.COVERAGE_FUNCTIONS }}" | ||
echo "COVERAGE_LINES=${{ vars.COVERAGE_LINES }}" | ||
|
||
# Log Environment Variables | ||
- name: Log Environment Variables | ||
run: | | ||
echo "COVERAGE_STATEMENTS1=${{ vars.COVERAGE_STATEMENTS }}" | ||
echo "COVERAGE_BRANCHES1=${{ vars.COVERAGE_BRANCHES }}" | ||
echo "COVERAGE_FUNCTIONS1=${{ vars.COVERAGE_FUNCTIONS }}" | ||
echo "COVERAGE_LINES1=${{ vars.COVERAGE_LINES }}" | ||
- name: Log Environment Variables 2 | ||
run: | | ||
echo "COVERAGE_STATEMENTS2=${{ env.COVERAGE_STATEMENTS }}" | ||
echo "COVERAGE_BRANCHES2=${{ env.COVERAGE_BRANCHES }}" | ||
echo "COVERAGE_FUNCTIONS2=${{ env.COVERAGE_FUNCTIONS }}" | ||
echo "COVERAGE_LINES2=${{ env.COVERAGE_LINES }}" |