Add feature gating for slow tests and cache SRS using git LFS #176
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
name: Tests | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
env: | |
CI: 1 | |
CARGO_INCREMENTAL: 1 | |
jobs: | |
test: | |
name: build-and-test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Give GitHub Actions access to sygmaprotocol/zipline | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.SYGMA_REPO_PULL_KEY }} | |
- uses: actions/checkout@v3 | |
with: | |
lfs: true | |
- name: Checkout LFS objects # used for structured reference strings for tests (.srs files) | |
run: git lfs checkout | |
- name: Read toolchain file | |
id: rust-toolchain | |
run: | | |
RUST_TOOLCHAIN=$(grep 'channel' rust-toolchain.toml | awk '{split($0,a," = "); print a[2]}' | tr -d '"') | |
echo "RUST_TOOLCHAIN=$RUST_TOOLCHAIN" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ steps.rust-toolchain.outputs.RUST_TOOLCHAIN }} | |
components: rustfmt | |
- name: Install just | |
uses: extractions/setup-just@v1 | |
- name: Download consensus spec | |
run: just download-spec-tests | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Build contracts | |
run: just build-contracts | |
- name: Test | |
# currently this is skipping the rotation circuit spec tests because they use too much memory on CI and cause it to be stopped | |
# This should be fixed in a future PR and tests re-enabled | |
run: RUST_LOG="lightclient-circuits=debug" FLEX_SHA_SPREAD_COLUMNS=2 cargo test --release -- --nocapture --skip test_sync_circuit --skip test_committee_update_circuit |