Debian Codegraph @

.github/workflows/build-and-test-cache.yml

raw
1 name: Build and Test Cache Module
2
3 on:
4 pull_request:
5 types: [opened, reopened, synchronize]
6 paths:
7 - 'cache/**'
8 push:
9 branches: [dev, main]
10 paths:
11 - 'cache/**'
12
13 jobs:
14 build_test:
15 strategy:
16 matrix:
17 os: [macos-latest, ubuntu-latest, windows-latest]
18
19 runs-on: ${{matrix.os}}
20
21 steps:
22 - uses: actions/checkout@v3
23
24 - uses: actions/setup-go@v4
25 with:
26 go-version-file: "./cache/go.mod"
27
28 - name: Build
29 working-directory: ./cache
30 run: go build -x
31
32 - name: Test
33 working-directory: ./cache
34 run: go test -race -v ./...
35
36 - name: Lint
37 # lint even when a previous step failed
38 if: ${{!cancelled()}}
39 uses: golangci/golangci-lint-action@v3
40 with:
41 working-directory: ./cache
42 version: v1.52
43 args: -v