-
Notifications
You must be signed in to change notification settings - Fork 3
68 lines (62 loc) · 1.69 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
60
61
62
63
64
65
66
67
68
name: Linting & Testing
on:
push:
branches:
# dependabot/** branches are generated by https://github.com/dependabot
- dependabot/**
pull_request:
types:
- opened
- synchronize
workflow_call:
jobs:
# separate job to set as required in branch protection,
# as the build names above change each time Node versions change
test:
name: "Linting"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-go@v3
with:
go-version: ${{ vars.RTLDEV_MW_CI_GOLANG_VERSION }}
check-latest: true
- name: Super Linter Code Base
uses: github/super-linter/slim@v4
env:
FILTER_REGEX_INCLUDE: "/*|/scripts/*|updateVersion.sh|apiclient.go"
DEFAULT_BRANCH: master
VALIDATE_GO: true
VALIDATE_BASH: true
VALIDATE_ALL_CODEBASE: false
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run build
run: go build .
- name: Run vet
run: go vet .
test_matrix:
strategy:
matrix:
go-version:
- ${{ vars.RTLDEV_MW_CI_GOLANG_VERSION }}
runs-on: ubuntu-latest
needs: test
name: Test Matrix @ GO v${{ matrix.go-version }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
check-latest: true
- name: Run build
run: go build .
- name: Run test
run: ./scripts/test-go.sh