-
Notifications
You must be signed in to change notification settings - Fork 433
67 lines (62 loc) · 1.67 KB
/
ci.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: ci
on:
push:
branches:
- master
pull_request:
branches:
- '*'
jobs:
format-test:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: CodeGen
run: go generate ./...
- name: Formatting diff
run: go fmt ./... && git diff --exit-code --name-only
linux-tests:
strategy:
matrix:
go: [ 1.22.x ]
runs-on: ubuntu-20.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v2.1.4
with:
go-version: ${{ matrix.go }}
- name: Install fuse
run: sudo apt-get update && sudo apt-get install -y fuse3 libfuse-dev
- name: Build
run: |
CGO_ENABLED=0 go build ./...
go install ./tools/build_gcsfuse
build_gcsfuse . /tmp ${GITHUB_SHA}
- name: Test all except caching parallely
run: CGO_ENABLED=0 go test -count 1 -v `go list ./... | grep -v internal/cache/...`
- name: Test caching
run: CGO_ENABLED=0 go test -p 1 -count 1 -v ./internal/cache/...
- name: Cache RaceDetector Test
run: go test -p 1 -count 1 -v -race ./internal/cache/...
lint:
name: Lint
runs-on: ubuntu-20.04
steps:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.22"
- name: checkout code
uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@032fa5c5e48499f06cf9d32c02149bfac1284239
with:
args: -E=goimports --timeout 2m0s
only-new-issues: true