Zksolc version 1.3.14 support #187
Workflow file for this run
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
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
name: test | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build-tests: | |
name: build tests / ${{ matrix.archive.name }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
archive: | |
- name: unit-tests | |
file: nextest-unit.tar.zst | |
flags: --workspace --all-features --lib --bins | |
- name: integration-tests | |
file: nextest-integration.tar.zst | |
flags: --workspace | |
- name: external-integration-tests | |
file: nextest-external-integration.tar.zst | |
flags: -p foundry-cli --features external-integration-tests | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- uses: taiki-e/install-action@nextest | |
- name: Build archive (unit tests) | |
run: | | |
cargo nextest archive \ | |
--locked \ | |
--archive-file ${{ matrix.archive.file }} \ | |
${{ matrix.archive.flags }} | |
- name: Upload archive | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.archive.name }} | |
path: ${{ matrix.archive.file }} | |
install-svm-solc: | |
name: install svm and solidity / ${{ matrix.job.name }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Install svm | |
run: cargo install svm-rs | |
- name: Install Solidity 0.8.19 | |
run: svm install 0.8.19 | |
- name: Install Solidity 0.8.20 | |
run: svm install 0.8.20 | |
- name: Use Solidity 0.8.19 | |
run: svm use 0.8.19 | |
unit: | |
name: unit tests / ${{ matrix.job.name }} | |
runs-on: ubuntu-latest | |
needs: build-tests | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
job: | |
- name: non-forking | |
filter: "!test(~fork) & !test(~live)" | |
- name: forking | |
filter: "test(~fork) & !test(~live)" | |
env: | |
ETH_RPC_URL: https://eth-mainnet.alchemyapi.io/v2/C3JEvfW6VgtqZQa-Qp1E-2srEiIc02sD | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: taiki-e/install-action@nextest | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Download archives | |
uses: actions/download-artifact@v3 | |
with: | |
name: unit-tests | |
- name: cargo nextest | |
run: | | |
# see https://github.com/foundry-rs/foundry/pull/3959 | |
export LD_LIBRARY_PATH="$(rustc --print sysroot)/lib" | |
cargo nextest run --retries 3 --archive-file nextest-unit.tar.zst -E '${{ matrix.job.filter }}' | |
issue-repros-tests: | |
name: issue reproduction tests / ${{ matrix.job.name }} / ${{ matrix.job.partition }} | |
runs-on: ubuntu-latest | |
needs: build-tests | |
strategy: | |
matrix: | |
job: | |
- name: issue-repros | |
filter: "test(~issue)" | |
partition: [1, 2] | |
env: | |
ETH_RPC_URL: https://eth-mainnet.alchemyapi.io/v2/C3JEvfW6VgtqZQa-Qp1E-2srEiIc02sD | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: taiki-e/install-action@nextest | |
- name: Download archives | |
uses: actions/download-artifact@v3 | |
with: | |
name: integration-tests | |
- name: Forge RPC cache | |
uses: actions/cache@v3 | |
if: matrix.job.name != 'issue-repros' | |
with: | |
path: "$HOME/.foundry/cache" | |
key: rpc-cache-${{ hashFiles('cli/tests/rpc-cache-keyfile') }} | |
- name: Setup git config | |
run: | | |
git config --global user.name "GitHub Actions Bot" | |
git config --global user.email "<>" | |
- name: cargo nextest | |
run: | | |
# see https://github.com/foundry-rs/foundry/pull/3959 | |
export LD_LIBRARY_PATH="$(rustc --print sysroot)/lib" | |
cargo nextest run --partition count:${{ matrix.partition }}/2 --retries 3 --archive-file nextest-integration.tar.zst -E '${{ matrix.job.filter }}' | |
doctests: | |
name: doc tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: cargo test | |
run: cargo test --locked --workspace --all-features --doc | |
clippy: | |
name: clippy | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@clippy | |
- run: cargo clippy --workspace --all-targets --all-features | |
env: | |
RUSTFLAGS: -Dwarnings | |
fmt: | |
name: fmt | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
- run: cargo fmt --all --check | |