WIP: Tests-set-up #61
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run tests | |
on: | |
push: | |
branches: | |
- 'testnet' | |
tags: | |
- 'v*' | |
pull_request: | |
branches: | |
- 'testnet' | |
jobs: | |
test: | |
name: Run 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: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '21.7.1' | |
- name: Install pnpm | |
run: npm install -g pnpm | |
- name: Install dependencies | |
run: 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: pnpm test | |
- name: Retry test if failed | |
if: ${{ failure() && matrix.attempt != '3' }} | |
run: exit 1 |