improve ccc testing codes #1096
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: Unit Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [synchronize, opened, reopened, ready_for_review] | |
branches: | |
- main | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
CARGO_INCREMENTAL: false | |
jobs: | |
skip_check: | |
runs-on: ubuntu-latest | |
outputs: | |
should_skip: ${{ steps.skip_check.outputs.should_skip }} | |
steps: | |
- id: skip_check | |
uses: fkirc/skip-duplicate-actions@v5 | |
with: | |
cancel_others: 'true' | |
concurrent_skipping: 'same_content_newer' | |
paths_ignore: '["**/README.md"]' | |
linux-test: | |
if: | | |
github.event.pull_request.draft == false && | |
(github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true') | |
name: Linux Test on ${{ matrix.rust }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
arch: [amd64] | |
rust: [nightly] | |
container: | |
image: ${{ matrix.arch }}/rust | |
env: | |
# Disable full debug symbol generation to speed up CI build and keep memory down | |
# "1" means line tables only, which is useful for panic tracebacks. | |
RUSTFLAGS: "-C debuginfo=1" | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- run: git config --system --add safe.directory /__w/scroll-prover/scroll-prover | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '>=1.18.0' | |
- name: Setup Rust toolchain | |
run: | | |
rustup toolchain install ${{ matrix.rust }} | |
rustup default ${{ matrix.rust }} | |
rustup component add rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
- name: Run tests | |
run: cargo test |