-
Notifications
You must be signed in to change notification settings - Fork 5
52 lines (42 loc) · 1.02 KB
/
tests.yml
File metadata and controls
52 lines (42 loc) · 1.02 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
name: Tests
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
code-tests:
name: Code
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# Differential ShellCheck requires full git history
fetch-depth: 0
- name: Dependency Review
uses: actions/dependency-review-action@v4
if: github.event_name == 'pull_request'
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Fix repository permissions
run: |
sudo chown -R $(id -u):$(id -g) .
- name: Check compatible min Go version
run: |
go mod tidy
- name: Download go dependencies
run: |
go mod download
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v7
- name: Run test build
run: |
make
- name: Run unit tests
run: |
go test -v ./...