forked from vitessio/vitess
-
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.
Merge pull request vitessio#9739 from tinyspeck/sarabee-ci-sigh
Add CI workflow for vtadmin-web unit tests
- Loading branch information
Showing
4 changed files
with
52 additions
and
3 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
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: vtadmin-web unit tests | ||
|
||
# In specifying the 'paths' property, we need to include the path to this workflow .yml file. | ||
# See https://github.community/t/trigger-a-workflow-on-change-to-the-yml-file-itself/17792/4) | ||
on: | ||
push: | ||
paths: | ||
- '.github/workflows/vtadmin_web_unit_tests.yml' | ||
- 'web/vtadmin/**' | ||
pull_request: | ||
paths: | ||
- '.github/workflows/vtadmin_web_unit_tests.yml' | ||
- 'web/vtadmin/**' | ||
|
||
defaults: | ||
run: | ||
working-directory: ./web/vtadmin | ||
|
||
jobs: | ||
unit-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
# node-version should match package.json | ||
node-version: '16.13.0' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run unit tests | ||
run: CI=true npm run test | ||
|
||
# Cancel pending and in-progress runs of this workflow if a newer ref is pushed to CI. | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true |
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