-
Notifications
You must be signed in to change notification settings - Fork 80
49 lines (45 loc) · 1.52 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Test
on:
pull_request:
push: {branches: main}
schedule: [{cron: '0 0 10 * *'}] # monthly https://crontab.guru/#0_0_10_*_*
workflow_dispatch:
permissions: {contents: read}
jobs:
test:
uses: nodenv/.github/.github/workflows/test.yml@v4
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: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: {fetch-depth: 0}
- uses: redhat-plumbers-in-action/differential-shellcheck@b8c7b83d16cce15d13563f5d055b34b9e3360ed3 # v5.3.1
with:
severity: error # TODO strengthen
token: ${{ secrets.GITHUB_TOKEN }}
lts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: npm ci
- run: npm run lint:lts
checksums:
runs-on: ubuntu-latest
steps:
# FIXME workaround https://github.com/actions/checkout/issues/910
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: { fetch-depth: 0 }
- run: npm ci
- 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'