Skip to content

Tweak ci

Tweak ci #15

Workflow file for this run

name: Node.js CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 20.x
cache: 'npm'
- name: Install Dependencies
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
- name: Cache node modules
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
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
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 20.x
cache: 'npm'
- name: Restore Dependencies from Cache
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}