-
Notifications
You must be signed in to change notification settings - Fork 15
696 lines (578 loc) · 22.1 KB
/
ci.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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
---
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [main, testnet, dev]
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions: read-all
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
docker-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build docker image
run: |
docker build -t gluwa/creditcoin .
- name: Start a container from image
run: |
# see https://opensource.com/article/18/5/how-find-ip-address-linux
IP_ADDRESS=$(curl https://ifconfig.me)
echo "INFO: IP_ADDRESS=$IP_ADDRESS"
docker run -d -p 9933:9933 -p 30333:30333 gluwa/creditcoin \
--validator --chain mainnet \
--mining-key 5DkPYq8hFiCeGxFBkz6DAwnTrvKevAJfTYrzFtr9hpDsEAU1 \
--name "test-node-$GITHUB_RUN_ID-attempt-$GITHUB_RUN_ATTEMPT" \
--public-addr "/dns4/$IP_ADDRESS/tcp/30333" \
--prometheus-external \
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0" \
--telemetry-url "wss://telemetry.creditcoin.network/submit/ 0" \
--bootnodes "/dns4/bootnode.creditcoin.network/tcp/30333/p2p/12D3KooWAEgDL126EUFxFfdQKiUhmx3BJPdszQHu9PsYsLCuavhb" "/dns4/bootnode2.creditcoin.network/tcp/30333/p2p/12D3KooWSQye3uN3bZQRRC4oZbpiAZXkP2o5UZh6S8pqyh24bF3k" "/dns4/bootnode3.creditcoin.network/tcp/30333/p2p/12D3KooWFrsEZ2aSfiigAxs6ir2kU6en4BewotyCXPhrJ7T1AzjN" \
--port 30333 --unsafe-rpc-external
- name: Healtcheck
run: |
sleep 60
./scripts/check-health.sh
- name: Kill the container
run: |
# this will also kill the parent container
sudo killall -9 creditcoin-node
- name: Start docker-compose
run: |
docker-compose up -d
- name: Sanity check for persistently mounted directory
run: |
sleep 60
docker exec creditcoin-validator ls -ld /creditcoin-node/data
docker exec creditcoin-validator ls -la /creditcoin-node/data
- name: Kill the container
run: |
# this will also kill the parent container
sudo killall -9 creditcoin-node
sanity-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check for parity between extrinsics, benchmarks and weights
run: |
echo "INFO: active pallets are"
./scripts/check-parity-bw-extrinsics-benchmarks-weights.sh --show-pallets
echo "========================"
./scripts/check-parity-bw-extrinsics-benchmarks-weights.sh
- name: Check migrations
run: |
./scripts/check-usage-of-log-warn.sh
- name: Check if Cargo.toml specifies dependencies from forks
run: |
./scripts/check-for-used-forks.sh
# dangerous conditions that will brick the blockchain
danger-will-brick-the-blockchain:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check for changes in Proof-of-Stake EPOCH duration
run: |
./scripts/check-for-changes-in-epoch-duration.sh "remotes/origin/$GITHUB_BASE_REF" "$GITHUB_SHA"
audit:
name: cargo audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set-Up
run: |
sudo apt-get update
sudo apt install -y protobuf-compiler
- name: Configure rustc version
run: |
source ci/env
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUSTC_VERSION }}
target: wasm32-unknown-unknown
profile: minimal
override: true
- uses: Swatinem/rust-cache@v2
- name: Install cargo audit
run: |
cargo install cargo-audit --features=fix
- name: Run cargo audit
run: |
cargo audit --ignore RUSTSEC-2020-0071
CC_MATCH=$(cargo audit --ignore RUSTSEC-2020-0071 --color never | grep -E "^.── creditcoin" || true)
# fail for anything which is a 1st level dependency of Creditcoin
if [ -n "$CC_MATCH" ]; then
echo "FAIL: Direct dependencies of Creditcoin found in audit report"
echo "INFO: Inspect the output above for more information"
exit 1
else
echo "INFO: No direct dependencies of Creditcoin found in audit report"
exit 0
fi
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Configure rustc version
run: |
source ci/env
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUSTC_VERSION }}
profile: minimal
override: true
components: rustfmt
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set-Up
run: |
sudo apt-get update
sudo apt install -y protobuf-compiler
- name: Configure rustc version
run: |
source ci/env
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUSTC_VERSION }}
target: wasm32-unknown-unknown
profile: minimal
override: true
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Run Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets --all-features -- -D warnings -A clippy::too_many_arguments -A clippy::type_complexity
check:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Set-Up
run: |
sudo apt-get update
sudo apt install -y cmake pkg-config libssl-dev git build-essential clang libclang-dev curl protobuf-compiler
- name: Configure rustc version
run: |
source ci/env
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUSTC_VERSION }}
target: wasm32-unknown-unknown
profile: minimal
override: true
- uses: Swatinem/rust-cache@v2
- name: Check Build
run: |
SKIP_WASM_BUILD=1 cargo check --release
- name: Check Build for Benchmarking
run: |
SKIP_WASM_BUILD=1 cargo check --features=runtime-benchmarks --release
test:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Set-Up
env:
HOMEBREW_NO_INSTALL_CLEANUP: true
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: true
run: |
brew update
brew install cmake openssl protobuf
- name: Configure rustc version
run: |
source ci/env
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUSTC_VERSION }}
target: wasm32-unknown-unknown
profile: minimal
override: true
- uses: Swatinem/rust-cache@v2
- name: Configure flags for collecting coverage
run: |
# shellcheck disable=SC2129
echo "CARGO_INCREMENTAL=0" >> "$GITHUB_ENV"
echo "RUSTFLAGS=-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests" >> "$GITHUB_ENV"
echo "RUSTDOCFLAGS=-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests" >> "$GITHUB_ENV"
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --features=try-runtime -- --test-threads 1
env:
CARGO_INCREMENTAL: ${{ env.CARGO_INCREMENTAL }}
RUSTFLAGS: ${{ env.RUSTFLAGS }}
RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }}
- id: coverage
uses: actions-rs/[email protected]
with:
config: .grcov.yml
- uses: codecov/codecov-action@v3
with:
files: ${{ steps.coverage.outputs.report }}
fail_ci_if_error: true
verbose: true
build-creditcoin-node:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set-Up
run: |
sudo apt-get update
sudo apt install -y cmake pkg-config libssl-dev git build-essential clang libclang-dev curl protobuf-compiler
- name: Configure rustc version
run: |
source ci/env
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUSTC_VERSION }}
target: wasm32-unknown-unknown
profile: minimal
override: true
- uses: Swatinem/rust-cache@v2
- name: Build SUT
uses: actions-rs/cargo@v1
with:
command: build
args: --release --features fast-runtime
- name: Upload creditcoin-node binary
uses: actions/upload-artifact@v3
with:
name: creditcoin-node
path: target/release/creditcoin-node
- name: Upload WASM runtime
uses: actions/upload-artifact@v3
with:
name: creditcoin_node_runtime.compact.compressed.wasm
path: target/release/wbuild/creditcoin-node-runtime/creditcoin_node_runtime.compact.compressed.wasm
integration-test-loan-cycle:
needs:
- build-creditcoin-node
runs-on: ubuntu-22.04
# checkov:skip=CKV2_GHA_1:We need this for creditcoin-js typedefs auto-commit
permissions: write-all
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 10
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Download creditcoin-node binary
uses: actions/download-artifact@v3
with:
name: creditcoin-node
path: target/release
- name: Start SUT
run: |
chmod a+x ./target/release/creditcoin-node
./target/release/creditcoin-node --dev --mining-key 5DkPYq8hFiCeGxFBkz6DAwnTrvKevAJfTYrzFtr9hpDsEAU1 --monitor-nonce auto >~/creditcoin-node.log 2>&1 &
- name: Start local Ethereum node
run: |
docker run --rm -p 8545:8545 -d gluwa/hardhat-dev
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install -g yarn
- name: Prepare for integration tests
run: |
pushd integration-tests/
# wait for creditcoin-node to initialize
./yarn-install-and-wait-for-creditcoin.sh
git checkout yarn.lock
popd
- name: Auto-update typedefs
id: update_typedefs
run: |
pushd creditcoin-js/
./get-metadata.sh
yarn build:types
yarn format
echo "========== DEBUG DEBUG DEBUG =========="
git status --short
git diff
echo "======================================="
if [ -n "$(git status --short)" ]; then
git diff
echo "git_diff=true" >> "$GITHUB_OUTPUT"
fi
popd
- name: Execute integration tests
run: |
pushd integration-tests/
yarn test
popd
- name: Git diff in case of failure
if: failure()
run: |
git diff
- name: Commit changes for typedefs
if: ${{ success() && steps.update_typedefs.outputs.git_diff == 'true' }}
uses: EndBug/add-and-commit@v9
with:
author_name: gluwa-bot
author_email: [email protected]
message: "Auto-update creditcoin-js type definitions"
github_token: ${{ secrets.CREDITCOIN_GITHUB_API_TOKEN }}
- name: Upload logs
uses: actions/upload-artifact@v3
if: always()
with:
name: logs
path: ~/creditcoin-node.log
- name: Kill SUT
run: |
# if all went well kill the node. Otherwise GitHub Actions would exit on the
# previous step killing everything and we don't have to worry about
# dangling processes
killall -9 creditcoin-node
integration-test-csub-552:
needs:
- build-creditcoin-node
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Download creditcoin-node binary
uses: actions/download-artifact@v3
with:
name: creditcoin-node
path: target/release
- name: Download runtime
uses: actions/download-artifact@v3
with:
name: creditcoin_node_runtime.compact.compressed.wasm
path: target/release
- name: Install Subwasm
uses: actions-rs/cargo@v1
with:
command: install
args: --locked --git https://github.com/chevdor/subwasm --tag v0.17.1
- name: Import blocks
run: |
chmod a+x ./target/release/creditcoin-node
./target/release/creditcoin-node import-blocks \
--chain ./integration-tests/csub-552/reproSpec.json \
--base-path ./integration-tests/csub-552/chaindata/node1 \
--state-pruning archive --blocks-pruning archive \
--database paritydb ./integration-tests/csub-552/repro.blocks
- name: Start Node 1
run: |
./target/release/creditcoin-node \
--chain ./integration-tests/csub-552/reproSpec.json \
--validator --alice --mining-threads 1 --pruning archive \
--mining-key 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY \
--node-key 844794b5f1da387970d769debc3a30f729f3515841121ccecebed2582723e04d \
--base-path ./integration-tests/csub-552/chaindata/node1 >creditcoin-node1.log 2>&1 &
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install -g yarn
- name: switchToPos()
run: |
pushd ./creditcoin-js/ && yarn install && yarn pack && popd || exit 1
yarn --cwd ./scripts/js upgrade 'creditcoin-js'
yarn --cwd ./scripts/js runtimeUpgrade ws://127.0.0.1:9944 ../../target/release/creditcoin_node_runtime.compact.compressed.wasm //Alice 0
yarn --cwd ./scripts/js switchToPos ws://127.0.0.1:9944 //Alice 5
- name: Wait for finalized blocks to catch-up
run: |
./scripts/wait-for-finalized-blocks.sh
- name: Store info about the last finalized block
id: last-block-info
run: |
# store info about the last finalized block before the fork
LAST_BLOCK=$(curl --silent -H "Content-Type: application/json" \
-d '{"id": 1, "jsonrpc": "2.0", "method": "chain_getFinalizedHead", "params": [] }' \
http://127.0.0.1:9933 | jq -r .result)
while true; do
LAST_BLOCK_NUMBER=$(curl --silent -H "Content-Type: application/json" \
-d "{\"id\": 1, \"jsonrpc\": \"2.0\", \"method\": \"chain_getBlock\", \"params\": [\"$LAST_BLOCK\"] }" \
http://127.0.0.1:9933 | jq -r .result | jq -r .block.header.number)
if [ "$LAST_BLOCK_NUMBER" != "null" ]; then
break
else
echo "INFO: retry fetching block info for $LAST_BLOCK"
sleep 10
fi
done
echo "last_block_number=$LAST_BLOCK_NUMBER" >> "$GITHUB_OUTPUT"
- name: Start Node 2
run: |
./target/release/creditcoin-node \
--base-path integration-tests/csub-552/chaindata/node2 \
--chain integration-tests/csub-552/reproSpec.json \
--validator --mining-threads 1 --pruning archive \
--mining-key 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY \
--bootnodes '/ip4/127.0.0.1/tcp/30333/p2p/12D3KooWSrv5vZAh2Xr97BpyHLZ8scGqcaPr8CLYvm4EVtLwKiXy' \
--port 30332 --ws-port 9942 --rpc-port 9932 >creditcoin-node2.log 2>&1 &
- name: Wait for node2 to sync past block number ${{ steps.last-block-info.outputs.last_block_number }}
run: |
# Note: node2 will crash if a panic occurs and this script would fail
./scripts/wait-for-sync.sh ${{ steps.last-block-info.outputs.last_block_number }} http://127.0.0.1:9932
- name: Upload logs
uses: actions/upload-artifact@v3
if: always()
with:
name: csub-552-logs
path: "*.log"
- name: Kill SUT
run: |
# if all went well kill the node. Otherwise GitHub Actions would exit on the
# previous step killing everything and we don't have to worry about
# dangling processes
killall -9 creditcoin-node
javascript-lint:
name: javascript-lint / ${{ matrix.directory }}
runs-on: ubuntu-22.04
strategy:
matrix:
directory: [creditcoin-js, integration-tests, scripts/js, scripts/cc-cli]
steps:
- uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install -g yarn
- name: Run tools
run: |
pushd creditcoin-js/ && yarn install && yarn pack && popd
pushd ${{ matrix.directory }}
yarn upgrade 'creditcoin-js'
yarn lint
popd
javascript-typecheck:
name: javascript-typecheck / ${{ matrix.directory }}
runs-on: ubuntu-22.04
strategy:
matrix:
directory: [creditcoin-js, integration-tests, scripts/js, scripts/cc-cli]
steps:
- uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install -g yarn
- name: Run tools
run: |
pushd creditcoin-js/ && yarn install && yarn pack && popd
pushd ${{ matrix.directory }}
yarn upgrade 'creditcoin-js'
yarn typecheck
popd
javascript-format:
name: javascript-format / ${{ matrix.directory }}
runs-on: ubuntu-22.04
strategy:
matrix:
directory: [creditcoin-js, integration-tests, scripts/js, scripts/cc-cli]
steps:
- uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install -g yarn
- name: Run tools
run: |
pushd creditcoin-js/ && yarn install && yarn pack && popd
pushd ${{ matrix.directory }}
yarn upgrade 'creditcoin-js'
if ! yarn check-format; then
echo "FAIL: JavaScript is not formatted properly!"
echo "HELP: Execute 'yarn format' and commit the changes to fix this"
exit 1
fi
popd
benchmark:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Inspect benchmark CI config
run: |
# WARNING: Command below may differ depending on which workflow config file
# your job is defined in !!! Don't copy&paste it blindly !!!
PALLETS_IN_CI_CONFIG=$(grep "./scripts/bench.sh -p" .github/workflows/ci.yml | grep -v PALLETS_IN_CI_CONFIG | tr -s ' ' | cut -d' ' -f4 | sort | xargs)
PALLETS_IN_SOURCE=$(./scripts/check-parity-bw-extrinsics-benchmarks-weights.sh --show-pallets)
if [ "$PALLETS_IN_CI_CONFIG" != "$PALLETS_IN_SOURCE" ]; then
echo "FAIL: Pallet mismatch between source code and benchmark CI config"
echo "INFO: in source: '$PALLETS_IN_SOURCE'"
echo "INFO: CI config: '$PALLETS_IN_CI_CONFIG'"
exit 1
fi
- name: Set-Up
run: |
sudo apt-get update
sudo apt install -y cmake pkg-config libssl-dev git build-essential clang libclang-dev curl protobuf-compiler
- name: Configure rustc version
run: |
source ci/env
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUSTC_VERSION }}
target: wasm32-unknown-unknown
profile: minimal
override: true
- uses: Swatinem/rust-cache@v2
- name: Build benchmarks
uses: actions-rs/cargo@v1
with:
command: build
args: --release --features runtime-benchmarks
- name: Check if runner machine meets chain's requirements
continue-on-error: true
run: |
./scripts/check-hardware.sh
- name: Run benchmarks to generate dummy weights
run: |
./scripts/bench.sh -p creditcoin -b -r 1 -s 2
./scripts/bench.sh -p offchain_task_scheduler -b -r 1 -s 2
./scripts/bench.sh -p rewards -b -r 1 -s 2
# check if automatically generated weights compile
- name: Rebuild SUT with newly generated weights
uses: actions-rs/cargo@v1
with:
command: build
args: --release
shellcheck:
name: "🐚 Shellcheck"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Run ShellCheck
uses: ludeeus/[email protected]
env:
SHELLCHECK_OPTS: -e SC2002 # allow useless cat commands