Skip to content

Commit

Permalink
test: will now run coverage on files since changed
Browse files Browse the repository at this point in the history
  • Loading branch information
FreakinWard committed Apr 23, 2024
1 parent de4b7ca commit d39b17f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
- run: |
git fetch --no-tags --depth=1 origin main
git checkout -b main
git checkout ${{ github.event.pull_request.head.sha }}
- name: Set up Node.js
uses: actions/setup-node@v1
Expand All @@ -41,7 +45,7 @@ jobs:
run: npm install

- name: Run the tests
run: npm run test:cover -- --changedSince=main
run: npm run test:cover:changed

# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v1
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"test": "jest",
"test:report": "open html-report/report.html",
"test:cover": "jest --coverage",
"test:cover:changed": "jest --coverage --changedSince=main",
"test:cover:report": "open coverage/lcov-report/index.html",
"test:e2e": "cypress run",
"test:e2e:open": "cypress open",
Expand Down

0 comments on commit d39b17f

Please sign in to comment.