1- name : (all packages) Unit tests
2- on :
3- push :
4- tags :
5- - v*
6- pull_request :
1+ name : Go Tests
2+ on : [push]
3+ concurrency :
4+ group : ${{ github.workflow }}-${{ github.ref }}
5+ cancel-in-progress : true
76jobs :
8- unit :
7+ test :
8+ runs-on : ${{ matrix.test.vm }}
99 strategy :
1010 fail-fast : false
1111 matrix :
12- project :
13- - name : lib
14- path : ./lib/
15- - name : gotestloghelper
16- path : ./tools/gotestloghelper/
17- - name : testlistgenerator
18- path : ./tools/testlistgenerator/
19- - name : ecrimagefetcher
20- path : ./tools/ecrimagefetcher/
21- - name : ghlatestreleasechecker
22- path : ./tools/ghlatestreleasechecker/
23- - name : asciitable
24- path : ./tools/asciitable/
25- - name : flakeguard
26- path : ./tools/flakeguard/
27- - name : workflowresultparser
28- path : ./tools/workflowresultparser/
29- - name : parrot
30- path : ./parrot/
31- runs-on : ubuntu-latest
32- name : ${{ matrix.project.name }} unit tests
12+ test :
13+ - path : framework
14+ vm : ubuntu-latest
15+ regex : TestComponent
16+ - path : wasp
17+ vm : ubuntu-latest
18+ regex : TestSmoke
19+ - path : wasp
20+ vm : ubuntu-latest
21+ regex : TestBenchSpy
22+ - path : k8s-test-runner
23+ vm : ubuntu-latest
24+ regex : ./...
25+ - path : parrot
26+ vm : ubuntu-latest
27+ regex : ./...
28+ - path : tools/workflowresultparser
29+ vm : ubuntu-latest
30+ regex : ./...
31+ - path : tools/asciitable
32+ vm : ubuntu-latest
33+ regex : ./...
34+ - path : tools/ghlatestreleasechecker
35+ vm : ubuntu-latest
36+ regex : ./...
37+ - path : tools/ecrimagefetcher
38+ vm : ubuntu-latest
39+ regex : ./...
40+ - path : tools/testlistgenerator
41+ vm : ubuntu-latest
42+ regex : ./...
43+ - path : tools/gotestloghelper
44+ vm : ubuntu-latest
45+ regex : ./...
46+ - path : tools/citool
47+ vm : ubuntu-latest
48+ regex : ./...
3349 steps :
34- - name : Checkout the Repo
35- uses : actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
36- - name : Setup Go
50+ - uses : actions/checkout@v3
51+ - name : Set up Go
3752 uses : actions/setup-go@v5
3853 with :
39- go-version : ' v1.24.0'
40- - name : Install gotestloghelper
41- run : go install github.com/smartcontractkit/chainlink-testing-framework/tools/gotestloghelper@latest
42- - name : Run Tests
43- run : |
44- PATH=$PATH:$(go env GOPATH)/bin
45- export PATH
46- set -euo pipefail
47- # disabled, because we want to use a multiline output of go list command
48- # shellcheck disable=SC2046
49- cd ${{ matrix.project.path }} && \
50- make test_unit
51- - name : Publish Artifacts
52- if : failure()
53- uses : actions/upload-artifact@v4
54+ go-version : ' 1.24.0'
55+ - name : Cache Go modules
56+ uses : actions/cache@v4
5457 with :
55- name : test-logs
56- path : /tmp/gotest.log
58+ path : |
59+ ~/.cache/go-build
60+ ~/go/pkg/mod
61+ key : go-modules-${{ hashFiles('wasp/go.sum') }}-${{ runner.os }}-test
62+ restore-keys : |
63+ go-modules-${{ runner.os }}-test
64+ go-modules-${{ runner.os }}
65+ - uses : extractions/setup-just@v2
66+ - name : Run tests
67+ run : |
68+ just test ${{ matrix.test.path }} ${{ matrix.test.regex }}
0 commit comments