-
Notifications
You must be signed in to change notification settings - Fork 54
119 lines (119 loc) · 4.11 KB
/
solidity-hardhat.yml
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#name: Solidity-Hardhat
#
#on:
# merge_group:
# push:
#
#env:
# NODE_OPTIONS: --max_old_space_size=8192
#
#defaults:
# run:
# shell: bash
#
#jobs:
# changes:
# name: Detect changes
# runs-on: ubuntu-latest
# outputs:
# changes: ${{ steps.changes.outputs.src }}
# steps:
# - name: Checkout the repo
# uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
# - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
# id: changes
# with:
# filters: |
# src:
# - 'contracts/src/!(v0.8/(llo-feeds|keystone|ccip|liquiditymanager|functions|transmission)/**)/**/*'
# - 'contracts/test/**/*'
# - 'contracts/package.json'
# - 'contracts/pnpm-lock.yaml'
# - 'contracts/hardhat.config.ts'
# - 'contracts/ci.json'
# - '.github/workflows/solidity-hardhat.yml'
#
# split-tests:
# name: Split Solidity Tests
# runs-on: ubuntu-latest
# outputs:
# splits: ${{ steps.split.outputs.splits }}
# steps:
# - name: Checkout the repo
# uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
# - name: Generate splits
# id: split
# uses: ./.github/actions/split-tests
# with:
# config: ./contracts/ci.json
# - name: Collect Metrics
# id: collect-gha-metrics
# uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
# with:
# id: solidity-split-tests
# org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
# basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
# hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
# this-job-name: Split Solidity Tests
# continue-on-error: true
#
# solidity-splits:
# needs: [changes, split-tests]
# if: needs.changes.outputs.changes == 'true'
# name: Solidity ${{ matrix.split.id }} ${{ fromJSON('["(skipped)", ""]')[needs.changes.outputs.changes == 'true'] }}
# strategy:
# fail-fast: false
# matrix:
# split: ${{ fromJson(needs.split-tests.outputs.splits) }}
# runs-on: ubuntu-latest
# steps:
# - name: Checkout the repo
# uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
# - name: Setup NodeJS
# uses: ./.github/actions/setup-nodejs
# - name: Setup Hardhat
# uses: ./.github/actions/setup-hardhat
# with:
# namespace: coverage
# - name: Run tests
# env:
# SPLIT: ${{ matrix.split.tests }}
# working-directory: contracts
# run: pnpm test -- $SPLIT
# - name: Collect Metrics
# id: collect-gha-metrics
# uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
# with:
# id: solidity-splits
# org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
# basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
# hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
# this-job-name: Solidity ${{ matrix.split.id }}
# continue-on-error: true
#
# solidity:
# needs: [changes, solidity-splits]
# name: Solidity
# runs-on: ubuntu-latest
# if: always()
# steps:
# - run: echo 'Solidity tests finished!'
# - name: Check test results
# run: |
# if [[ "${{ needs.changes.result }}" = "failure" || "${{ needs.solidity-splits.result }}" = "failure" ]]; then
# echo "One or more changes / solidity-splits jobs failed"
# exit 1
# else
# echo "All test jobs passed successfully"
# fi
# - name: Collect Metrics
# if: always()
# id: collect-gha-metrics
# uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
# with:
# id: solidity-tests
# org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
# basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
# hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
# this-job-name: Solidity
# continue-on-error: true