-
Notifications
You must be signed in to change notification settings - Fork 22
54 lines (51 loc) · 1.24 KB
/
basic-checks.yml
File metadata and controls
54 lines (51 loc) · 1.24 KB
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
name: Basic Checks
on:
push:
branches:
- main
pull_request:
jobs:
lint:
env:
GOLANGCI_LINT_VERSION: v1.62.0
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ^1.24
- uses: technote-space/get-diff-action@v6.1.2
id: git_diff
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: Clear module cache
run: go clean -modcache
- name: Download dependencies
run: go mod download
- name: Install golangci-lint
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION}
- name: Run golangci-lint
run: make lint
unit-tests:
runs-on: ubuntu-latest
services:
docker:
image: docker:dind
options: --privileged
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ^1.24
- name: Wait for Docker
run: |
until docker info; do
echo "Waiting for Docker daemon..."
sleep 1
done
- name: Run unit tests
run: go test -v ./...