-
-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (32 loc) · 923 Bytes
/
Copy pathbuild.yml
File metadata and controls
41 lines (32 loc) · 923 Bytes
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
name: Build and test
on: [push, pull_request]
permissions: {}
env:
GOLANGCI_LINT_VERSION: v2.11
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [stable, oldstable]
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
- name: Download and check dependencies
run: |
go mod tidy --diff
- name: Install golangci-lint ${{ env.GOLANGCI_LINT_VERSION }}
uses: golangci/golangci-lint-action@v9
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
- name: Run tests
run: make test
env:
TEST_ARGS: "--count=1" # disable go test cache
- name: Display docker-compose logs
if: failure()
run: docker compose -f script/docker-compose.yml logs