Debian Codegraph @

.github/workflows/test.yml

raw symbols SCIP
1 on:
2 push:
3 branches: [master]
4 pull_request:
5 name: Test
6 permissions:
7 contents: read
8 jobs:
9 test:
10 strategy:
11 matrix:
12 go-version: [1.21.x, 1.22.x]
13 platform: [ubuntu-latest, macos-latest, windows-latest]
14 runs-on: ${{ matrix.platform }}
15 steps:
16 - name: Install Go
17 uses: actions/setup-go@v5
18 with:
19 go-version: ${{ matrix.go-version }}
20 - name: Install staticcheck
21 run: go install honnef.co/go/tools/cmd/staticcheck@latest
22 shell: bash
23 - name: Install golint
24 run: go install golang.org/x/lint/golint@latest
25 shell: bash
26 - name: Update PATH
27 run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
28 shell: bash
29 - name: Checkout code
30 uses: actions/checkout@v4
31 - name: Fmt
32 if: matrix.platform != 'windows-latest' # :(
33 run: "diff <(gofmt -d .) <(printf '')"
34 shell: bash
35 - name: Vet
36 run: go vet ./...
37 - name: Staticcheck
38 run: staticcheck ./...
39 - name: Lint
40 run: golint ./...
41 - name: Test
42 run: go test -race ./libwebp -coverprofile=coverage.txt -covermode=atomic
43 - name: Upload coverage reports to Codecov
44 uses: codecov/[email protected]
45 with:
46 token: ${{ secrets.CODECOV_TOKEN }}