-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.1 KB
/
ci-quick.yml
File metadata and controls
49 lines (40 loc) · 1.1 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
name: ci-quick
on:
pull_request:
push:
branches:
- main
- master
permissions:
contents: read
concurrency:
group: ci-quick-${{ github.ref }}
cancel-in-progress: true
jobs:
quick-check:
name: Quick Go Checks
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Normalize go.mod replace for CI
shell: bash
run: |
# Keep CI independent from developer-local absolute replace paths.
if grep -q '^replace .* => /' go.mod; then
cp go.mod go.mod.bak
sed '/^replace .* => \/.*/d' go.mod.bak > go.mod
echo "Removed local absolute replace directives from go.mod for CI run"
fi
- name: Run unit/build checks
run: GOWORK=off go test ./...
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: v2.11.3
args: --verbose --allow-serial-runners ./...