-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (53 loc) · 1.7 KB
/
coverage.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Coverage report
on:
push:
branches: [ main ]
# allow manual workflow dispatch from actions tab
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
Deploy:
environment:
name: github-pages
url: ${{ steps.deployment.output.page_url }}
runs-on: ubuntu-latest
strategy:
matrix:
# Coverage node version
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- uses: actions/configure-pages@v5
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Node.js modules cache
uses: actions/cache@v4
id: modules-cache
with:
path: ${{ github.workspace }}/node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}-modules
- name: Install Node.js packages
if: ${{ steps.modules-cache.outputs.cache-hit != 'true' }}
run: npm install
- name: Setup coverage report
run: npm run test:coverage
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './coverage/lcov-report'
- name: Deploy to pages
id: deployment
uses: actions/deploy-pages@v4