add optimism network to hardhat config #80
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 | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
FOUNDRY_PROFILE: ci | |
jobs: | |
foundry: | |
strategy: | |
fail-fast: true | |
name: Hardhat + Foundry tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Create env file | |
run: | | |
touch .env | |
echo RPC_MUMBAI=${{ secrets.RPC_MUMBAI }} >> .env | |
echo RPC_POLYGON=${{ secrets.RPC_POLYGON }} >> .env | |
echo LOCAL_PRIVATE_KEY=${{ secrets.LOCAL_PRIVATE_KEY }} >> .env | |
echo DEPLOYER_PRIVATE_KEY=${{ secrets.DEPLOYER_PRIVATE_KEY }} >> .env | |
- name: Setup Node 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "16.x" | |
cache: "npm" | |
- name: Install Node dependencies | |
run: | | |
npm ci | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Run Forge build | |
run: | | |
forge --version | |
forge build --sizes | |
id: build | |
- name: Run Forge tests | |
run: | | |
forge test -vvv | |
id: forge-test | |
- name: Run Hardhat tests | |
run: | | |
npx hardhat test --network hardhat | |
id: hardhat-test |