-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0965aeb
commit a9cc790
Showing
3 changed files
with
344 additions
and
43 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,78 @@ | ||
name: Tests | ||
on: [push, pull_request] | ||
env: | ||
CARGO_TERM_COLOR: always | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
name: Rust | ||
|
||
- name: Cache cargo build | ||
uses: Swatinem/rust-cache@v1 | ||
on: | ||
merge_group: | ||
push: | ||
branches: [dev, main] | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
branches: [dev, main] | ||
|
||
- name: Setup Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
profile: minimal | ||
components: rustfmt, clippy | ||
target: wasm32-unknown-unknown | ||
|
||
- name: Run cargo fmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
- name: Run cargo clippy | ||
uses: actions-rs/cargo@v1 | ||
jobs: | ||
test: | ||
runs-on: [ubuntu-latest] | ||
strategy: | ||
fail-fast: false | ||
env: | ||
RUSTFLAGS: -D warnings | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
command: clippy | ||
args: --all-targets -- -D warnings | ||
repository: lurk-lab/ci-workflows | ||
- uses: ./.github/actions/ci-env | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: taiki-e/install-action@nextest | ||
- uses: Swatinem/rust-cache@v2 | ||
# make sure benches don't bit-rot | ||
- name: build benches & examples | ||
run: cargo build --benches --examples --release | ||
- name: cargo test | ||
run: | | ||
cargo nextest run --release --profile ci | ||
- name: Doctests | ||
run: | | ||
cargo test --doc | ||
- name: Run tests | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
check-lurk-compiles: | ||
if: github.event_name == 'pull_request' | ||
runs-on: [ubuntu-latest] | ||
env: | ||
RUSTFLAGS: -D warnings | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: ${{ github.workspace }}/bellpepper | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: lurk-lab/lurk-rs | ||
path: ${{ github.workspace }}/lurk | ||
submodules: recursive | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Patch Cargo.toml | ||
working-directory: ${{ github.workspace }}/lurk | ||
run: | | ||
echo "[patch.'https://github.com/lurk-lab/grumpkin-msm']" >> Cargo.toml | ||
echo "grumpkin-msm = { path='../grumpkin-msm' }" >> Cargo.toml | ||
- name: Check Lurk-rs types don't break spectacularly | ||
working-directory: ${{ github.workspace }}/lurk | ||
run: cargo check --all --tests --benches --examples | ||
|
||
- name: Run grumpkin_msm example | ||
run: cargo run --release --example grumpkin_msm | ||
# Wasm build, rustfmt, clippy, doctests, and MSRV | ||
code-quality: | ||
uses: lurk-lab/ci-workflows/.github/workflows/lints.yml@main | ||
|
||
- name: Run pasta_msm example | ||
run: cargo run --release --example pasta_msm | ||
# Check documentation links aren't broken | ||
link-checker: | ||
uses: lurk-lab/ci-workflows/.github/workflows/links-check.yml@main | ||
with: | ||
fail-fast: true | ||
|
||
- name: Check benches build | ||
run: cargo check --benches | ||
# Lint dependencies for licensing and auditing issues as per https://github.com/lurk-lab/bellpepper/blob/main/deny.toml | ||
licenses-audits: | ||
uses: lurk-lab/ci-workflows/.github/workflows/licenses-audits.yml@main |
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
Oops, something went wrong.