-
Notifications
You must be signed in to change notification settings - Fork 1
88 lines (80 loc) · 2.24 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
go:
- "1.19"
- "1.20"
- "1.21"
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
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
go-version: ${{ matrix.go }}
- name: Scan for Vulnerabilities in Code
uses: Templum/govulncheck-action@6bb063b41d78c53c2fc7f5589828e30ad7c697ee
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
go-version: ${{ matrix.go }}
- name: Initialize CodeQL
uses: github/codeql-action/init@1245696032ecf7d39f87d54daa406e22ddf769a8
with:
languages: go
queries: +security-extended,security-and-quality
ram: 4096
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@1245696032ecf7d39f87d54daa406e22ddf769a8
with:
category: '/language:go'