56 lines (46 loc) · 1.27 KB
/
commit_tests.yml
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
name: Commit tests
on:
push:
paths:
- '.github/workflows/commit_tests.yml'
- '**/*.go'
jobs:
unit-test:
name: Unit testing
runs-on: ubuntu-latest
env:
GOFLAGS: -mod=readonly
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Checkout code
uses: actions/checkout@v3
- name: Prepare environment
run: |
sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu libbtrfs-dev
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
- name: Tests
run: |
make unit-tests
lint:
name: Lint
runs-on: ubuntu-latest
env:
GOFLAGS: -mod=readonly
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Checkout code
uses: actions/checkout@v3
- name: Prepare environment
run: |
sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu libbtrfs-dev
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.43.0
- name: Lint
run: |
make lint