Skip to content

Commit

Permalink
Adding per PR tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
lvella committed Apr 12, 2024
1 parent fd79e14 commit 13932ac
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: PR tests

on:
workflow_dispatch:
pull_request:
merge_group:
push:
branches:
- main

env:
CARGO_TERM_COLOR: always

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Rust toolchain 1.74 (with clippy and rustfmt)
run: rustup toolchain install 1.74-x86_64-unknown-linux-gnu && rustup component add clippy --toolchain 1.74-x86_64-unknown-linux-gnu && rustup component add rustfmt --toolchain 1.74-x86_64-unknown-linux-gnu
- name: Format
run: cargo fmt --all --check --verbose
- name: Lint
run: cargo clippy --all --all-targets --all-features --profile pr-tests -- -D warnings
- name: Build
run: cargo build --all --all-targets --all-features --profile pr-tests
- uses: taiki-e/install-action@nextest
- name: Run tests
run: cargo nextest run --workspace --all-features --all-targets --profile pr-tests
9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,12 @@ env_logger = "0.10.0"

[build-dependencies]
num_cpus = "1.16.0"

[profile.pr-tests]
inherits = "dev"
opt-level = 3
debug = "line-tables-only"
debug-assertions = true
overflow-checks = true
panic = 'unwind'
codegen-units = 256

0 comments on commit 13932ac

Please sign in to comment.