Skip to content

Commit

Permalink
chore(ci): add Vitest Coverage Action (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushmanchhabra authored Jun 23, 2024
1 parent e086cdf commit 75d8850
Show file tree
Hide file tree
Showing 5 changed files with 427 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Get Node version from Node manifest
- name: Get Node version from NW.js versions manifest
run: echo "NODE_VER=$(curl -s https://nwjs.io/versions | jq -r ".versions[0].components.node")" >> $GITHUB_ENV
- name: Setup Node
uses: actions/[email protected]
Expand All @@ -33,3 +33,25 @@ jobs:
run: npm ci --nwjs-build-type=sdk
- name: Run tests
run: npm t
cov:
runs-on: ubuntu-22.04
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Get Node version from NW.js versions manifest
run: echo "NODE_VER=$(curl -s https://nwjs.io/versions | jq -r ".versions[0].components.node")" >> $GITHUB_ENV
- name: Setup Node
uses: actions/[email protected]
with:
node-version: ${{ env.NODE_VER }}
cache: "npm"
- name: Install dependencies
run: npm ci --nwjs-build-type=sdk
- name: Enable Coverage
run: npm run test:cov
- name: Report Coverage
if: always()
uses: davelosert/[email protected]
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
coverage
node_modules
nwjs*
Loading

0 comments on commit 75d8850

Please sign in to comment.