-
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.
Add JavaScript tests npm command and GitHub workflow (#80)
* Rename current tests to 'Ruby on Rails Tests' * Add docs for the local execution of the JavaScript tests * Add GitHub actions workflow configuration for the JavaScript tests
- Loading branch information
1 parent
1b907ea
commit 6a02d0f
Showing
4 changed files
with
52 additions
and
2 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,42 @@ | ||
name: "[CI] JavaScript Tests" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
env: | ||
CI: "true" | ||
NODE_VERSION: 16.9.1 | ||
|
||
jobs: | ||
test-report: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Get npm cache directory path | ||
id: npm-cache-dir-path | ||
run: echo "::set-output name=dir::$(npm get cache)-vocdoni" | ||
|
||
- uses: actions/cache@v2 | ||
id: npm-cache | ||
with: | ||
path: ${{ steps.npm-cache-dir-path.outputs.dir }} | ||
key: npm-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
npm- | ||
- run: npm ci | ||
- run: npm run test | ||
name: Node test | ||
env: | ||
CODECOV: 1 |
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,4 +1,4 @@ | ||
name: "[CI] Tests" | ||
name: "[CI] Ruby on Rails Tests" | ||
|
||
on: | ||
push: | ||
|
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