Skip to content

Run tests against Fendermint (remote Docker image) #3

Run tests against Fendermint (remote Docker image)

Run tests against Fendermint (remote Docker image) #3

Workflow file for this run

name: Run tests against Fendermint (remote Docker image)
on:
schedule:
- cron: '0 0 * * *' # Run every day at midnight
workflow_dispatch: # Enable manual running
jobs:
checkout:
runs-on: ubuntu-latest
steps:
- name: Checkout tests
uses: actions/checkout@v2
- name: Checkout Fendermint
uses: actions/checkout@v2
with:
repository: 'consensus-shipyard/fendermint'
submodules: 'recursive'
path: 'fendermint'
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '14.x'
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Install cargo-make
run: cargo install -f cargo-make
- name: Run a testnode
run: |
cd $GITHUB_WORKSPACE/fendermint
export BALANCE=1000000
out = { $(cargo make --makefile ./infra/Makefile.toml testnode | tee /dev/fd/3); } 3>&1
private_key = $(echo $out | sed -e 's/\(.*\)\([a-f0-9]\{64\}\)/0x\2/' | grep 0x)
echo "DEPLOYER_PRIVATE_KEY=$private_key" >> "$GITHUB_OUTPUT"
echo "USER_1_PRIVATE_KEY=$private_key" >> "$GITHUB_OUTPUT"
- name: 'Run tests: web3.js SimpleCoin'
run: |
npx hardhat --network local test ./test/web3.js/SimpleCoin.js
- name: 'Run tests: web3.js ERC20 tests'
run: |
npx hardhat --network local test ./test/web3.js/ERC20.js
- name: 'Run tests: ethers.js SimpleCoin'
run: |
npx hardhat --network local test ./test/ethers.js/SimpleCoin.js
- name: 'Run tests: ethers.js ERC20'
run: |
npx hardhat --network local test ./test/ethers.js/ERC20.js