fix: parameterize circuit paths and fix tests #129
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: Foundry | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "**" | |
jobs: | |
test: | |
name: Foundry Tests Linux | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly-2024-01-01 | |
override: true | |
- name: Build CLI | |
run: | | |
npm install | |
mv build/axiom-std-cli-build.js build/axiom-std-cli-temp-build.js | |
cp src/AxiomCli.sol src/AxiomCli.sol.temp | |
npm run build | |
diff build/axiom-std-cli-build.js build/axiom-std-cli-temp-build.js | |
diff src/AxiomCli.sol src/AxiomCli.sol.temp | |
rm build/axiom-std-cli-temp-build.js | |
rm src/AxiomCli.sol.temp | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Check forge version | |
run: forge --version | |
- name: Check forge tree | |
run: forge tree | |
- name: Run Foundry tests | |
run: | | |
export PROVIDER_URI_SEPOLIA=${{ secrets.PROVIDER_URI_SEPOLIA }} | |
export PROVIDER_URI_BASE=${{ secrets.PROVIDER_URI_BASE }} | |
export PROVIDER_URI_MAINNET=${{ secrets.PROVIDER_URI_MAINNET }} | |
RUST_BACKTRACE=1 forge test -vvvv | |
test-mac: | |
name: Foundry Tests Mac | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly-2024-01-01 | |
override: true | |
- name: Build CLI | |
run: | | |
npm install | |
mv build/axiom-std-cli-build.js build/axiom-std-cli-temp-build.js | |
cp src/AxiomCli.sol src/AxiomCli.sol.temp | |
npm run build | |
diff build/axiom-std-cli-build.js build/axiom-std-cli-temp-build.js | |
diff src/AxiomCli.sol src/AxiomCli.sol.temp | |
rm build/axiom-std-cli-temp-build.js | |
rm src/AxiomCli.sol.temp | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Check forge version | |
run: forge --version | |
- name: Check forge tree | |
run: forge tree | |
- name: Run Foundry tests | |
run: | | |
export PROVIDER_URI_SEPOLIA=${{ secrets.PROVIDER_URI_SEPOLIA }} | |
export PROVIDER_URI_BASE=${{ secrets.PROVIDER_URI_BASE }} | |
export PROVIDER_URI_MAINNET=${{ secrets.PROVIDER_URI_MAINNET }} | |
RUST_BACKTRACE=1 forge test -vvvv |