-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (64 loc) · 1.7 KB
/
ci.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: CI
on:
workflow_dispatch: {}
push:
branches:
- main
tags:
- v[0-9]+.[0-9]+.[0-9]+*
pull_request:
branches:
- main
permissions:
contents: read
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
go-version-file: 'go.mod'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
- name: lint
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest &&
$HOME/go/bin/staticcheck &&
make vet
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
go:
- "1.19"
- "1.18"
- "1.17"
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
go-version: ${{ matrix.go }}
- name: Test
run: make test
vulncheck:
name: Vulnerabilities check
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
with:
persist-credentials: false
sparse-checkout: |
apps/portier-backend
- name: Scan for Vulnerabilities in Code
uses: Templum/govulncheck-action@6bb063b41d78c53c2fc7f5589828e30ad7c697ee