-
Notifications
You must be signed in to change notification settings - Fork 86
60 lines (51 loc) · 1.58 KB
/
test.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
on:
workflow_call:
inputs:
package_folder:
required: true
type: string
name:
required: true
type: string
precache:
required: false
type: string
jobs:
check:
strategy:
fail-fast: true
name: Test
runs-on: ubuntu-latest
steps:
- name: Set initial test ${{ inputs.name }} status
uses: myrotvorets/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: pending
context: Test ${{ inputs.name }} status
- uses: actions/checkout@v4
- name: Install node deps and founry
uses: ./.github/actions/setup_deps
- name: Run precache command
if: ${{ inputs.precache != null }}
run: cd ${{ inputs.package_folder}} && ${{ inputs.precache }}
- name: Load foundry cache
uses: ./.github/actions/cache_foundry_build
with:
package_folder: ${{ inputs.package_folder }}
- name: Build contracts
run: |
cd ${{ inputs.package_folder}} && forge build
- name: Test
run: |
cd ${{ inputs.package_folder}} && pnpm run test
env:
TENDERLY_KEY: ${{ secrets.TENDERLY_KEY }}
ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }}
CONDUIT_KEY: ${{ secrets.CONDUIT_KEY }}
- name: Set initial test ${{ inputs.name }} status
uses: myrotvorets/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
context: Test ${{ inputs.name }} status