Repository navigation
69 lines (61 loc) · 1.8 KB
/
Copy pathnode.yml
File metadata and controls
69 lines (61 loc) · 1.8 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Node
on:
workflow_call:
inputs:
coverage:
description: Upload the `coverage/lcov.info` that the tests write to Codecov
type: boolean
default: true
macos:
description: Also run the macOS leg
type: boolean
default: false
sparse-checkout:
description: Non-cone sparse-checkout patterns passed to actions/checkout
type: string
default: ''
submodules:
description: Check out submodules
type: boolean
default: false
secrets:
CACHIX_AUTH_TOKEN:
description: Upload token for the `hakula` Cachix cache
permissions:
contents: read
jobs:
node:
name: Node Check (${{ matrix.os }})
runs-on: ${{ matrix.os == 'macOS' && 'macos-latest' || 'ubuntu-latest' }}
permissions:
contents: read
id-token: write
strategy:
fail-fast: false
matrix:
os: ${{ fromJSON(inputs.macos && '["Linux", "macOS"]' || '["Linux"]') }}
steps:
- name: Checkout
uses: actions/checkout@v7
with:
persist-credentials: false
sparse-checkout: ${{ inputs.sparse-checkout }}
sparse-checkout-cone-mode: ${{ inputs.sparse-checkout == '' }}
submodules: ${{ inputs.submodules }}
- name: Set up Nix
uses: $/.github/actions/setup-nix
with:
cachix_auth_token: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Install dependencies
run: |
nix develop \
--print-build-logs \
-c pnpm install --frozen-lockfile
- name: Run tests
run: nix develop -c pnpm test
- name: Upload to Codecov
if: ${{ inputs.coverage }}
uses: codecov/codecov-action@v7
with:
files: coverage/lcov.info
use_oidc: true