Repository navigation
58 lines (51 loc) · 1.97 KB
/
Copy pathtest.yml
File metadata and controls
58 lines (51 loc) · 1.97 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
name: Test
on:
push:
pull_request:
schedule: [{ cron: "0 0 10 * *" }] # monthly https://crontab.guru/#0_0_10_*_*
workflow_dispatch:
permissions: {}
jobs:
test:
uses: nodenv/.github/.github/workflows/test.yml@bd27009d5f178c0a88d42f7b07e6a3c7623ed768 # v7.0.8
with: { superlinter: false } # TODO renable superlinter
permissions:
contents: read
packages: read
id-token: write
security-events: write
statuses: write
# https://github.com/redhat-plumbers-in-action/differential-shellcheck
shellcheck:
permissions: { contents: read, security-events: write }
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
with: { egress-policy: audit }
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with: { fetch-depth: 0 }
- uses: redhat-plumbers-in-action/differential-shellcheck@f51c7c0d32777d00de777131d25918617a246415 # v5.5.7
with:
severity: error # TODO strengthen
token: ${{ secrets.GITHUB_TOKEN }}
lts:
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
with: { egress-policy: audit }
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- run: npm ci
- run: npm run lint:lts
checksums:
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
with: { egress-policy: audit }
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with: { fetch-depth: 0 }
- run: npm ci
# FIXME workaround https://github.com/actions/checkout/issues/910
- if: github.event_name == 'pull_request'
run: npm run lint:checksums -- origin/${{github.base_ref}}
- run: npm run lint:checksums -- HEAD^
if: github.event_name == 'push'