Repository navigation
54 lines (48 loc) · 1.78 KB
/
Copy pathci.yml
File metadata and controls
54 lines (48 loc) · 1.78 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
name: CI
# task ci on every pull request and every push to main - the gate, lint, typecheck, the unit
# tests and the package.
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
# go-tools' downloads (sfw, versions) ask GitHub with this: anonymous ones are the first it sheds
# under load.
env:
GITHUB_TOKEN: ${{ github.token }}
jobs:
gate:
# The check main's ruleset requires, named Gate in every spin-stack repository.
name: Gate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# The gate's testidentity reads the branch's commits since origin/main, which a pull
# request's shallow checkout does not have.
fetch-depth: 0
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
# No store cache: a package restored from one is never asked of the registry, so Socket
# Firewall, which stands between the two, would not see it.
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: '22'
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
- run: go tool task ci
# The coverage task test wrote, even when a test failed: the summary says so when there is none.
- if: always()
run: go tool task coverage:summary
- if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: coverage-web
path: coverage
retention-days: 7
if-no-files-found: ignore