-
Notifications
You must be signed in to change notification settings - Fork 11
49 lines (41 loc) · 1019 Bytes
/
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
on:
pull_request:
merge_group:
schedule:
- cron: 0 23 * * *
env:
GO_VERSION: '1.22'
jobs:
test:
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: ${{ env.GO_VERSION }}
- uses: actions/setup-go@v5
if: matrix.os == 'windows-latest'
with:
go-version: ${{ env.GO_VERSION }}
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