Repository navigation
75 lines (65 loc) · 1.89 KB
/
Copy pathci-tools.yml
File metadata and controls
75 lines (65 loc) · 1.89 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
name: CI Tools
run-name: CI Tools
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}-tools-tests
cancel-in-progress: true
on:
push:
branches:
- develop
- "release/*"
merge_group:
pull_request:
paths:
- "tools/**"
- ".github/workflows/ci-tools.yml"
- ".github/actions/**"
workflow_dispatch:
jobs:
matrix:
name: Generate Tools Matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.tools-matrix.outputs.matrix }}
steps:
- name: Checkout the repo
uses: actions/checkout@v7
with:
persist-credentials: false
repository: smartcontractkit/chainlink
fetch-depth: 0
- name: Setup CI CLI
uses: ./.github/actions/setup-ci-cli
- name: Generate tools test matrix
id: tools-matrix
env:
GITHUB_EVENT_NAME: ${{ github.event_name }}
GITHUB_BASE_REF: ${{ github.base_ref }}
run: ci tools matrix
tools-tests:
name: Tools Unit Tests (${{ matrix.target.name }})
needs: [matrix]
if: ${{ needs.matrix.outputs.matrix != '[]' && needs.matrix.outputs.matrix != '' && needs.matrix.outputs.matrix != 'null' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: ${{ fromJson(needs.matrix.outputs.matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Go
uses: actions/setup-go@v7
with:
go-version-file: ${{ matrix.target.dir }}/go.mod
cache: true
cache-dependency-path: |
go.sum
tools/**/go.sum
- name: Setup gotestsum
uses: ./.github/actions/setup-gotestsum
- name: Run tests
working-directory: ${{ matrix.target.dir }}
run: gotestsum --format github-actions -- ${{ matrix.target.packages }}