-
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.
workflow file
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Unit Tests | ||
|
||
on: | ||
# the 1st condition | ||
workflow_run: # triggers when "build" runs and completes | ||
workflows: ["CI-CD"] | ||
types: | ||
- completed | ||
|
||
jobs: # create job called "test" to perform Unit Tests | ||
test: | ||
runs-on: ubuntu-latest. # this job will run on the latest version of Ubuntu | ||
steps: # list of steps that need to be taken when Unit Tests is triggered | ||
- uses: actions/checkout@v3 # check out code from repository | ||
- name: Install dependencies # install all dependencies needed for Unit Tests (ex. Jest) | ||
run: npx yarn | ||
- uses: actions/download-artifact@v3 # download compiled code from build and make it available for Unit Tests | ||
with: | ||
path: dist | ||
- name: Run Tests # run Unit Tests using Jest | ||
run: npx yarn test |