chore: separate test workflow for each package #1
Workflow file for this run
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 for Core | |
on: pull_request | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-22.04] | |
arch: [amd64] | |
# Elasticsearch used by MultiversX test | |
services: | |
elasticsearch: | |
image: "docker.elastic.co/elasticsearch/elasticsearch:8.12.0" | |
env: | |
discovery.type: single-node | |
xpack.security.enabled: false | |
ports: | |
- "9200:9200" | |
steps: | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Test | |
timeout-minutes: 15 | |
run: | | |
nohup sh -c "anvil -p 8545" > anvil1.out 2>&1 & | |
nohup sh -c "anvil -p 8546" > anvil2.out 2>&1 & | |
sleep 30 | |
npm run test |