-
Notifications
You must be signed in to change notification settings - Fork 13
52 lines (44 loc) · 1.37 KB
/
contract-showcase-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
name: Contract Showcase CI
on:
pull_request:
paths:
- contracts_showcase/**
defaults:
run:
working-directory: ./contracts_showcase/
jobs:
collect_dirs:
runs-on: ubuntu-latest
outputs:
dirs: ${{ steps.dirs.outputs.dirs }}
steps:
- uses: actions/checkout@v2
- id: dirs
run: echo "dirs=$(ls -d ./*/ | jq --raw-input --slurp --compact-output 'split("\n")[:-1]')" >> ${GITHUB_OUTPUT}
run_tests:
needs: collect_dirs
runs-on: ubuntu-latest
strategy:
matrix:
dir: ${{ fromJson(needs.collect_dirs.outputs.dirs) }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: display folder
working-directory: ./contracts_showcase/${{ matrix.dir }}
run: ls
- name: Install node
uses: actions/setup-node@v3
with:
node-version: "18"
cache: "npm"
cache-dependency-path: ./contracts_showcase/${{ matrix.dir }}/package-lock.json
- name: Install dependencies
working-directory: ./contracts_showcase/${{ matrix.dir }}
run: npm install
- name: Test
working-directory: ./contracts_showcase/${{ matrix.dir }}
run: npm run start
env:
JSON_RPC_URL_PUBLIC: ${{ secrets.JSON_RPC_URL_PUBLIC }}
WALLET_PRIVATE_KEY: ${{ secrets.WALLET_PRIVATE_KEY }}