Skip to content

Contract Tests on Axon #366

Contract Tests on Axon

Contract Tests on Axon #366

Workflow file for this run

name: Contract Tests on Axon
on:
push:
pull_request:
schedule:
- cron: '50 0 * * *' # every 24 hour
# Use concurrency to ensure that only a single job or workflow
# using the same concurrency group will run at a time.
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions?query=workflow_dispatch#concurrency
concurrency:
group: axon
cancel-in-progress: false
jobs:
contract-test-on-axon:
runs-on: ubuntu-latest
strategy:
matrix:
axon-network: [axon_alphanet]
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
path: godwoken-tests
submodules: 'recursive'
- name: Update polyjuice-tests submodule
run: |
git submodule update --remote testcases/polyjuice-tests
working-directory: godwoken-tests
- uses: actions/setup-node@v4
with:
node-version: '16'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Hardhat cache
uses: actions/cache@v3
id: hardhat-cache
with:
path: ~/.cache/hardhat-nodejs
key: ${{ runner.os }}-hardhat-nodejs-axon
- name: Node Cache
uses: actions/cache@v3
id: npm-and-yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
~/.npm
key: ${{ runner.os }}-node_modules-${{ github.sha }}
restore-keys: |
${{ runner.os }}-node_modules-
- name: Deposit into accounts
working-directory: godwoken-tests/contracts
run: |
npm install
npx hardhat run scripts/deposit-accounts.js --network ${{ matrix.axon-network }}
- name: Test | Run polyjuice tests
working-directory: godwoken-tests/testcases/polyjuice-tests
run: |
npm install
npx hardhat test --network ${{ matrix.axon-network }}
- name: Test | Run internal contract tests
working-directory: godwoken-tests/contracts
run: |
npm install
npx hardhat run scripts/before-axon-devnet.js --network ${{ matrix.axon-network }}
npx hardhat test --network ${{ matrix.axon-network }}