-
Notifications
You must be signed in to change notification settings - Fork 7
73 lines (68 loc) · 2.07 KB
/
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
66
67
68
69
70
71
72
73
name: Test
permissions:
contents: read
on:
push:
branches:
- main
pull_request: null
jobs:
test:
strategy:
matrix:
go-version: [1.19.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version: ${{ matrix.go-version }}
- name: set env vars
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
with:
fetch-depth: 0
- name: cache go binaries
uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12
id: cache-go-bin
with:
path: ~/go/bin
key: ${{ runner.os }}-${{ hashFiles('**/go.mod') }}
restore-keys: ${{ runner.os }}-go-bin
- name: Lint
run: make lint
- name: test
run: make test
precommit:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
with:
fetch-depth: 0
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version: 1.19.x
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435
with:
python-version: "3.x"
- uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507
with:
extra_args: --show-diff-on-failure --from-ref ${{
github.event.pull_request.base.sha }} --to-ref ${{
github.event.pull_request.head.sha }}
env:
SKIP: lint
license:
runs-on: ubuntu-latest
needs:
- test
steps:
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version: 1.19.x
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- name: FOSSA Scan
uses: fossa-contrib/fossa-action@6cffaa064112e1cf9b5798c6224f9487dc1ec316
with:
fossa-api-key: 18f4ef488f514d06874b75f5809cea93