-
Notifications
You must be signed in to change notification settings - Fork 12
49 lines (42 loc) · 1.04 KB
/
test-go.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
name: test go
on:
pull_request:
merge_group:
schedule:
- cron: 0 23 * * *
jobs:
build:
name: building defsec
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest, windows-latest, ubuntu-latest ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
if: matrix.os != 'windows-latest'
with:
go-version-file: go.mod
cache: true
cache-dependency-path: go.sum
- uses: actions/setup-go@v5
if: matrix.os == 'windows-latest'
with:
go-version-file: go.mod
cache: false
- name: go mod tidy
if: matrix.os == 'ubuntu-latest'
run: |
go mod tidy
if [ -n "$(git status --porcelain)" ]; then
echo "Run 'go mod tidy' and push it"
exit 1
fi
- name: Run non-localstack tests
if: matrix.os != 'ubuntu-latest'
run: make test-no-localstack
shell: bash
- name: Run full tests
if: matrix.os == 'ubuntu-latest'
run: make test
shell: bash