Repository navigation
92 lines (83 loc) · 2.28 KB
/
Copy pathgo-all.yml
File metadata and controls
92 lines (83 loc) · 2.28 KB
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
89
90
91
92
name: Go
on:
push:
branches:
- develop
- main
pull_request:
permissions:
contents: read
jobs:
lint-mod:
strategy:
matrix:
modules: ['.','codec']
name: Lint (${{ matrix.modules }})
runs-on: ubuntu-latest
steps:
- name: Linting Go
uses: smartcontractkit/.github/actions/ci-lint-go@ci-lint-go/v4
with:
golangci-lint-version: v2.14.0
golangci-lint-args: --timeout 5m
go-directory: ${{ matrix.modules }}
test-mod:
strategy:
matrix:
modules: ['.','codec']
name: Tests (${{ matrix.modules }})
runs-on: ubuntu-latest
steps:
- name: Install Aptos CLI
uses: aptos-labs/actions/install-aptos-cli@528ef7ad9427a8c0720ea3eea790a9190d6e377d # 2026-04-09
with:
CLI_VERSION: 9.1.0
- name: Build and test
uses: smartcontractkit/.github/actions/ci-test-go@ci-test-go/v1
with:
use-go-cache: true
go-test-cmd: go -C ${{ matrix.modules }} test ./...
lint:
name: Lint
if: ${{ always() }}
needs: lint-mod
runs-on: ubuntu-latest
steps:
- name: Check Lint results
env:
GOLANGCI_RESULT: ${{ needs.lint-mod.result }}
run: |
if [[ "${GOLANGCI_RESULT}" == "success" ]]; then
echo "All 'Lint' matrix jobs succeeded."
exit 0
fi
if [[ "${GOLANGCI_RESULT}" == "cancelled" ]]; then
echo "'Lint' jobs were cancelled."
exit 1
fi
if [[ "${GOLANGCI_RESULT}" == "failure" ]]; then
echo "'Lint' matrix jobs had failures."
exit 1
fi
test:
name: Tests
if: ${{ always() }}
needs: test-mod
runs-on: ubuntu-latest
steps:
- name: Check Test results
env:
TEST_RESULT: ${{ needs.test-mod.result }}
run: |
if [[ "${TEST_RESULT}" == "success" ]]; then
echo "All 'Test' matrix jobs succeeded."
exit 0
fi
if [[ "${TEST_RESULT}" == "cancelled" ]]; then
echo "'Test' jobs were cancelled."
exit 1
fi
if [[ "${TEST_RESULT}" == "failure" ]]; then
echo "'Test' matrix jobs had failures."
exit 1
fi