Merge pull request #160 from cryptexfinance/cip-24 #275
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: Test Cryptex Contracts | |
on: | |
push: | |
branches: [ master, develop ] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }} | |
MAINNET_API_URL: ${{ secrets.MAINNET_API_URL }} | |
ARBITRUM_API_URL: ${{ secrets.ARBITRUM_API_URL }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- uses: borales/[email protected] | |
with: | |
cmd: install | |
- name: Setup | Rust | |
uses: ATiltedTree/setup-rust@v1 | |
with: | |
rust-version: stable | |
- name: Install Foundry | |
run: | | |
curl -L https://foundry.paradigm.xyz | bash | |
/home/runner/.config/.foundry/bin/foundryup | |
- name: Create .env File | |
run: cp .env.sample .env | |
- name: Set Alchemy Key | |
run: sed -i~ "s/<alchemy_key>/${ALCHEMY_KEY}/g" .env | |
- name: Build Contracts | |
run: yarn build | |
- name: Run Hardhat Tests | |
run: yarn test | |
- name: Remove Cache | |
run: rm -rf cache | |
- name: Run Forge tests | |
run: yarn ftest |