forked from catalystdao/generalised-relayer
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (53 loc) · 1.48 KB
/
tests.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
name: Run pnpm tests
on:
push:
branches:
- 'testnet'
tags:
- 'v*'
pull_request:
branches:
- 'testnet'
jobs:
test:
name: Run pnpm tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
attempt: [1,2,3]
# services:
# redis:
# image: redis:latest
# ports:
# - 6379:6379
# options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '21.7.1'
- name: Install curl
run: sudo apt-get update && sudo apt-get install -y curl
- name: Install Foundry and anvil
run: |
echo "Installing Foundry and anvil"
sudo chmod +x ./deployments/ci/install_foundry.sh
sudo ./deployments/ci/install_foundry.sh
- name: Install pnpm
run: sudo npm install -g pnpm
- name: Install dependencies
run: sudo pnpm install --no-frozen-lockfile
- name: Create typechain artifacts for relayer
run: pnpm postinstall
- name: Create typechain artifacts for tests
run: pnpm before-test
- name: Run tests
run: |
sudo export PATH="$HOME/.foundry/bin:$PATH"
sudo npm test
- name: Retry test if failed
if: ${{ failure() && matrix.attempt != '3' }}
run: exit 1