-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (34 loc) · 1.16 KB
/
Copy pathci.yml
File metadata and controls
43 lines (34 loc) · 1.16 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
name: CI
on:
push:
branches: [develop, main]
# All pull requests: stacked pull requests target each other, not develop.
pull_request:
permissions:
contents: read
# A new push cancels the older run for the same branch or pull request.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v7
with:
fetch-depth: 0 # git describe needs the tags for the version
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: '1.27'
check-latest: true
- name: Run the checks
run: make check
# make check runs as the runner user, so the tests that need root skip.
# They cover "sudo fly update": the owner of the binary, and a link that
# a hostile owner of the binary folder puts in place of the new file.
- name: Run the tests that need root
run: sudo env "PATH=$PATH" "GOCACHE=$(go env GOCACHE)" "GOMODCACHE=$(go env GOMODCACHE)" go test -count=1 -run 'TestReplaceBinary' ./internal/release/
- name: Build the release archives
run: make release