-
Notifications
You must be signed in to change notification settings - Fork 5
59 lines (57 loc) · 1.25 KB
/
test.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
name: Run Tests
on:
workflow_dispatch:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
jobs:
test:
name: Code Linting & Unit Tests
strategy:
matrix:
go-version: [ 1.21.x ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.55
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...
analyze:
needs: test
name: Analyze with CodeQL
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Init
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Analyze
uses: github/codeql-action/analyze@v2