-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 905 Bytes
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Test Package
on:
pull_request:
jobs:
run-tests:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{runner.os }}-build-${{ hashFiles('**/package-lock.json') }}
- run: npm install
- run: npm run test
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
test-results/junit.xml
- name: Upload coverage to Codecov
if: always()
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: check npm login
continue-on-error: true
run: npm whoami