Skip to content

Commit 9e6e84d

Browse files
committed
refactor(health-check): consolidate health check jobs into a single job with matrix strategy for improved efficiency
1 parent 50bb3e7 commit 9e6e84d

File tree

1 file changed

+6
-84
lines changed

1 file changed

+6
-84
lines changed

.github/workflows/health-checks.yml

Lines changed: 6 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -19,91 +19,13 @@ env:
1919
LIT_STATUS_BACKEND_URL: ${{ vars.LIT_STATUS_BACKEND_URL }}
2020

2121
jobs:
22-
datil-dev-health-check:
23-
runs-on: ubuntu-latest
24-
environment: Health Check
25-
env:
26-
PRIVATE_KEYS: ${{ secrets.PRIVATE_KEYS }}
27-
steps:
28-
- name: Checkout datil branch
29-
uses: actions/checkout@v4
30-
with:
31-
ref: ${{ github.event.inputs.datil_branch || 'master' }}
32-
fetch-depth: 1
33-
34-
- name: Setup Node.js
35-
uses: actions/setup-node@v4
36-
with:
37-
node-version: '18'
38-
39-
- name: Install rust
40-
uses: actions-rs/toolchain@v1
41-
with:
42-
toolchain: stable
43-
override: true
44-
components: rust-std
45-
46-
- name: Install wasm-pack
47-
uses: jetli/[email protected]
48-
with:
49-
version: 'latest'
50-
51-
- name: Install Yarn dependencies
52-
run: yarn install --frozen-lockfile
53-
54-
- name: Build project
55-
run: yarn build
56-
57-
- name: Run health check for datil-dev
58-
run: NETWORK=datil-dev yarn ci:health
59-
env:
60-
LIT_STATUS_WRITE_KEY: ${{ secrets.LIT_STATUS_WRITE_KEY }}
61-
LIT_STATUS_BACKEND_URL: ${{ vars.LIT_STATUS_BACKEND_URL }}
62-
63-
datil-test-health-check:
64-
runs-on: ubuntu-latest
65-
environment: Health Check
66-
env:
67-
PRIVATE_KEYS: ${{ secrets.PRIVATE_KEYS }}
68-
steps:
69-
- name: Checkout datil branch
70-
uses: actions/checkout@v4
71-
with:
72-
ref: ${{ github.event.inputs.datil_branch || 'master' }}
73-
fetch-depth: 1
74-
75-
- name: Setup Node.js
76-
uses: actions/setup-node@v4
77-
with:
78-
node-version: '18'
79-
80-
- name: Install rust
81-
uses: actions-rs/toolchain@v1
82-
with:
83-
toolchain: stable
84-
override: true
85-
components: rust-std
86-
87-
- name: Install wasm-pack
88-
uses: jetli/[email protected]
89-
with:
90-
version: 'latest'
91-
92-
- name: Install Yarn dependencies
93-
run: yarn install --frozen-lockfile
94-
95-
- name: Build project
96-
run: yarn build
97-
98-
- name: Run health check for datil-test
99-
run: NETWORK=datil-test yarn ci:health
100-
env:
101-
LIT_STATUS_WRITE_KEY: ${{ secrets.LIT_STATUS_WRITE_KEY }}
102-
LIT_STATUS_BACKEND_URL: ${{ vars.LIT_STATUS_BACKEND_URL }}
103-
10422
datil-health-check:
10523
runs-on: ubuntu-latest
10624
environment: Health Check
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
network: [datil-dev, datil-test, datil]
10729
env:
10830
PRIVATE_KEYS: ${{ secrets.PRIVATE_KEYS }}
10931
steps:
@@ -136,8 +58,8 @@ jobs:
13658
- name: Build project
13759
run: yarn build
13860

139-
- name: Run health check for datil
140-
run: NETWORK=datil yarn ci:health
61+
- name: Run health check for ${{ matrix.network }}
62+
run: NETWORK=${{ matrix.network }} yarn ci:health
14163
env:
14264
LIT_STATUS_WRITE_KEY: ${{ secrets.LIT_STATUS_WRITE_KEY }}
14365
LIT_STATUS_BACKEND_URL: ${{ vars.LIT_STATUS_BACKEND_URL }}

0 commit comments

Comments
 (0)