-
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.
chore(ci): add vitest coverage action (#556)
* Let Volta manage Node setup
- Loading branch information
1 parent
eb41e0c
commit 7abbf4b
Showing
6 changed files
with
298 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 |
---|---|---|
|
@@ -8,13 +8,15 @@ jobs: | |
publish: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: 20 | ||
|
||
- run: npm ci | ||
- run: npm run build | ||
- uses: JS-DevTools/[email protected] | ||
- name: Checkout repository | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Setup Volta | ||
uses: volta-cli/[email protected] | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Build output | ||
run: npm run build | ||
- name: Publish to npm | ||
uses: JS-DevTools/[email protected] | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} |
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 |
---|---|---|
|
@@ -5,14 +5,22 @@ on: | |
- main | ||
|
||
jobs: | ||
build: | ||
test: | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: 20 | ||
|
||
- run: npm ci | ||
- run: npm run lint | ||
- run: npm run test | ||
- name: Checkout repository | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Setup Volta | ||
uses: volta-cli/[email protected] | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Lint codebase | ||
run: npm run lint | ||
- name: Test codebase | ||
run: npm run test | ||
- name: Report coverage | ||
if: always() | ||
uses: davelosert/[email protected] |
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 |
---|---|---|
|
@@ -2,5 +2,6 @@ | |
node_modules | ||
|
||
# application | ||
coverage | ||
dist | ||
test/demo/index.js |
Oops, something went wrong.