Skip to content

Tweak ci

Tweak ci #13

Workflow file for this run

name: Node.js CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
setup:
runs-on: ubuntu-latest
outputs:
cache-key: ${{ steps.cache-keys.outputs.key }}
env:
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
steps:
- uses: actions/checkout@v2
- name: Use Node.js 20.x
uses: actions/setup-node@v2
with:
node-version: 20.x
- run: npm ci
- run: npm run build --if-present
- run: npm run compile --if-present
- name: Start local chain
run: |
npm run chain &
sleep 10
test:
needs: setup
runs-on: ubuntu-latest
strategy:
matrix:
package:
[
common,
ethernaut-ai,
ethernaut-challenges,
ethernaut-cli,
ethernaut-interact,
ethernaut-toolbox,
ethernaut-ui,
]
fail-fast: false # Keep running other jobs even if one fails
steps:
- uses: actions/checkout@v2
- name: Use Node.js 20.x
uses: actions/setup-node@v2
with:
node-version: 20.x
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Test ${{ matrix.package }}
run: cd packages/${{ matrix.package }} && npm t