Skip to content

v4.0.3

v4.0.3 #2846

Workflow file for this run

name: Tests - DeFiCh/metachain-ts-suite
on:
workflow_dispatch:
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
build:
env:
CARGO_INCREMENTAL: 0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Populate environment
run: ./make.sh ci-export-vars
- name: Setup dependencies
run: sudo ./make.sh ci-setup-deps
- name: Setup dependencies for user
run: ./make.sh ci-setup-user-deps
- uses: Swatinem/rust-cache@v2
with:
workspaces: lib -> ../build/lib/target
save-if: ${{ github.ref == 'refs/heads/master' }}
- name: Build binaries
run: ./make.sh build
- name: Upload binaries
uses: actions/upload-artifact@v3
with:
name: defi-bins
path: |
build/src/defid
test:
name: Frontier tests
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
with:
repository: defich/metachain-ts-tests
ref: 'main'
- name: Download binaries
uses: actions/download-artifact@v3
with:
name: defi-bins
- name: Setup permissions
run: |
chmod uog+x "$(pwd)/defid"
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: |
npm install
- name: Compiling contracts
run: |
npm run build
- name: Run tests
run: |
DEFID="$(pwd)/defid" npm run test