-
Notifications
You must be signed in to change notification settings - Fork 3
65 lines (53 loc) · 1.52 KB
/
lint-test.yaml
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
name: lint-test
on:
push:
branches: [ main ]
pull_request:
schedule:
- cron: '0 0 1 * *' # once a month
concurrency:
group: "lint-test"
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for to fetching pull requests
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout 5m
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
# - macos-latest-xlarge
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Install Docker (mac)
if: runner.os == 'macos'
run: |
brew install docker
colima start
# For testcontainers to find the Colima socket
# https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
- name: Run Tests
run: |
go test -mod=mod -shuffle=on -race -timeout 300s -coverprofile=coverage.txt -covermode=atomic ./...