-
Notifications
You must be signed in to change notification settings - Fork 430
51 lines (47 loc) · 1.21 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
name: ci
on:
push:
branches:
- master
pull_request:
branches:
- '*'
jobs:
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
run: CGO_ENABLED=0 go test -p 1 -count 1 -v -cover ./...
- name: Cache RaceDetector Test
run: CGO_ENABLED=1 go test -p 1 -count 1 -v -race -cover ./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