-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1023 Bytes
/
ci.yml
File metadata and controls
44 lines (37 loc) · 1023 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
42
43
44
name: CRUD go client - CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.18
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Check out code
uses: actions/checkout@v3
- name: Restore mod cache
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup private repo access
run: git config --global url.https://${{secrets.GH_ACCESS_TOKEN}}:x-oauth-basic@github.com/.insteadOf https://github.com/
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --enable gofmt
- name: Run Tests
run: go test `go list ./...` -timeout 15s -count=1