forked from smartcontractkit/chainlink-testing-framework
-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (59 loc) · 1.7 KB
/
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
51
52
53
54
55
56
57
58
59
name: Tests
on:
push:
tags:
- v*
branches:
- master
- main
pull_request:
jobs:
unit:
runs-on: ubuntu-latest
steps:
- name: Checkout the Repo
uses: actions/checkout@v3
- uses: smartcontractkit/tool-versions-to-env-action@v1.0.7
id: go-version
- run: echo ${{ steps.go-version.outputs.golang_version }}
- name: Install Go ${{ steps.go-version.outputs.golang_version }}
uses: actions/setup-go@v3
with:
go-version: ${{ steps.go-version.outputs.golang_version }}
- name: Cache Vendor Packages
uses: actions/cache@v3
id: cache-packages
with:
path: |
~/.cache/go-build
~/go/pkg/mod
~/go/bin
key: ${{ runner.os }}-go2-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go2-
- name: Download Go Vendor Packages and Ginkgo
if: steps.cache-packages.outputs.cache-hit != 'true'
run: make install_ci
- name: Run Tests
run: |
PATH=$PATH:$(go env GOPATH)/bin
export PATH
make test_unit
- name: Code Coverage
uses: codecov/codecov-action@v3
with:
files: ./unit-test-coverage.out
name: codecov-umbrella
- name: Publish Unit Test Results
uses: mikepenz/action-junit-report@v3.0.3
if: always()
with:
check_name: Unit Test Report
report_paths: './tests-unit-report.xml'
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Artifacts
if: failure()
uses: actions/upload-artifact@v3
with:
name: test-logs
path: ./logs