-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (67 loc) · 2.09 KB
/
Copy pathci.yml
File metadata and controls
71 lines (67 loc) · 2.09 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
70
71
name: CI
on:
push:
branches: [ "**" ]
pull_request:
branches: [ "**" ]
schedule:
- cron: "0 3 * * *" # Nightly at 3am UTC
jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: "1.26"
- name: Setup dev tools
run: make setup
- name: Lint, test, coverage threshold
run: make ci
- name: Run govulncheck
run: go run golang.org/x/vuln/cmd/govulncheck@latest ./...
- name: Upload coverage to Codecov
if: always()
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.out
fail_ci_if_error: true
integration-test:
if: github.event_name == 'schedule' || (github.event_name == 'push' && github.ref == 'refs/heads/main')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: "1.26"
- name: Setup dev tools
run: make setup
- name: Lint, test, coverage threshold
run: make ci
- name: Run govulncheck
run: go run golang.org/x/vuln/cmd/govulncheck@latest ./...
- name: Run integration tests (race)
run: go test -race ./test/integration/...
- name: Run make test-int
run: make test-int
release-snapshot:
# Exercises .goreleaser.yaml on every push/PR so config drift fails
# here instead of on a real tag push. Skips publish/sign/sbom — those
# are CI-only and tested for real by .github/workflows/release.yml.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0 # GoReleaser needs full history for changelog
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: go.mod
- name: GoReleaser snapshot
uses: goreleaser/goreleaser-action@v7
with:
version: "~> v2"
args: release --snapshot --clean --skip=publish,sign,sbom