-
Notifications
You must be signed in to change notification settings - Fork 39
50 lines (49 loc) · 1.9 KB
/
docker-test.yaml
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
name: (all packages) Docker Test Env tests
on:
pull_request_review:
types: [submitted]
pull_request:
types: [labeled]
jobs:
eth_env:
if: ${{ github.event_name == 'pull_request_review' || github.event.label.name == 'docker_tests' }}
runs-on: ubuntu-latest
name: Docker Test ${{ matrix.test.name }}
strategy:
fail-fast: false
matrix:
test:
- name: eth_env
tests: TestEthEnv
- name: eth_clients
tests: TestBesu|TestGeth|TestNethermind|TestErigon
- name: other
tests: TestPostgres|TestMockServer|TestKillgrave
steps:
- name: Checkout the Repo
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Install Go
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-go@e29366cdecfe6befff9ab8c3cfe4825218505d58 # v2.3.16
with:
test_download_vendor_packages_command: cd lib && go mod download
go_mod_path: ./lib/go.mod
cache_key_id: ctf-go
cache_restore_only: 'false'
- name: Install gotestloghelper
working-directory: lib
run: make gotestloghelper_build
- name: Run Tests
working-directory: lib
run: |
PATH=$PATH:$(go env GOPATH)/bin
export PATH
set -euo pipefail
# disabled, because we want to use a multiline output of go list command
# shellcheck disable=SC2046
go test -timeout 20m -json -parallel 2 -cover -covermode=atomic -coverprofile=unit-test-coverage.out $(go list ./... | grep /docker/test_env) -run '${{ matrix.test.tests }}' 2>&1 | tee /tmp/gotest.log | ../gotestloghelper -ci
- name: Publish Artifacts
if: failure()
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: test-logs
path: ./lib/logs