Skip to content

Commit aac7d13

Browse files
committed
simplify test CI, merge WASP and other tests
1 parent 2b93013 commit aac7d13

File tree

3 files changed

+102
-94
lines changed

3 files changed

+102
-94
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Unit tests (Makefile)
2+
on:
3+
push:
4+
tags:
5+
- v*
6+
pull_request:
7+
jobs:
8+
unit:
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
project:
13+
- name: lib
14+
path: ./lib/
15+
- name: flakeguard
16+
path: ./tools/flakeguard/
17+
runs-on: ubuntu-latest
18+
name: ${{ matrix.project.name }} unit tests
19+
steps:
20+
- name: Checkout the Repo
21+
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
22+
- name: Setup Go
23+
uses: actions/setup-go@v5
24+
with:
25+
go-version: 'v1.24.0'
26+
- name: Install gotestloghelper
27+
run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/gotestloghelper@latest
28+
- name: Run Tests
29+
run: |
30+
PATH=$PATH:$(go env GOPATH)/bin
31+
export PATH
32+
set -euo pipefail
33+
# disabled, because we want to use a multiline output of go list command
34+
# shellcheck disable=SC2046
35+
cd ${{ matrix.project.path }} && \
36+
make test_unit
37+
- name: Publish Artifacts
38+
if: failure()
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: test-logs
42+
path: /tmp/gotest.log

.github/workflows/test.yaml

Lines changed: 60 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,68 @@
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
76
jobs:
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 }}

.github/workflows/wasp-test.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)