-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EREGCSC-2004 -- Implement Vitest into our build pipeline (#1513)
* chore: first pass at adding Vitest tests to exp gh action * chore: remove prerequisites for test-javascript * chore: remove npm cache * chore: add optional dependency to package.json for ci/cd * chore: build-and-deploy-vue required before notify job * chore: add updated package-lock to source control * test: mock vue-router in SubjectSelector test suite * chore: run build pipeline for all Vue components before testing * chore: install npm deps without building * chore: remove superfluous job deps * chore: install FE deps in separate step before Vitest step * chore: don't block any jobs with Vitest job * fix: fix YAML formatting issue * fix: restore deploy-django to needs matrix for required output * chore: notify after only build-and-deploy-vue * chore: remove deploy-go requirement for cypress job * test: add leeway to flaky JS unit test * chore: make JS unit testing its own workflow * chore: remove environment from vitest workflow * chore: add some badges to README * chore: update branch name in Build Status badge table * chore: rearrange badges * chore: badge tweaks
- Loading branch information
Showing
9 changed files
with
282 additions
and
8 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
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,39 @@ | ||
name: "JavaScript Unit Tests with Vitest" | ||
|
||
on: | ||
pull_request: | ||
types: [ opened, synchronize, reopened ] | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
test-javascript: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
fail-fast: true | ||
steps: | ||
# Checkout the code | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
# Setup node environment | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
# Install Front End dependencies | ||
- name: Install Front End dependencies | ||
if: success() | ||
working-directory: ./solution | ||
run: | | ||
make install-npm | ||
# Execute the JavaScript tests | ||
- name: Run JavaScript unit tests with Vitest | ||
if: success() | ||
working-directory: ./solution | ||
run: | | ||
make test.vitest.coverage |
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
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
18 changes: 17 additions & 1 deletion
18
solution/ui/regulations/eregs-vite/src/components/subjects/SubjectSelector.test.js
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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