Skip to content

add attr macro integration tests to GHA #734

add attr macro integration tests to GHA

add attr macro integration tests to GHA #734

Workflow file for this run

name: Rust
on:
push:
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
build:
- pinned
- stable
- beta
- nightly
include:
- build: pinned
os: ubuntu-24.04
rust: 1.74.0
- build: stable
os: ubuntu-24.04
rust: stable
- build: beta
os: ubuntu-24.04
rust: beta
- build: nightly
os: ubuntu-24.04
rust: nightly
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install Rust
uses: hecrj/setup-rust-action@v1
with:
rust-version: ${{ matrix.rust }}
- name: Build
run: cd proptest && cargo build --verbose
- name: Run tests
run: cd proptest && cargo test --verbose
- name: Run macro tests
run: cd proptest-macro && cargo test --verbose
- name: Run macro integration tests
run: cargo test --verbose --test attr_macro --features attr-macro
- name: Build coverage no-default-features
if: ${{ matrix.build == 'stable' }}
env:
RUST_FLAGS: "-C link-dead-code"
run: cd proptest && cargo build --no-default-features --features default-code-coverage
- name: Build fork no-default-features
if: ${{ matrix.build == 'stable' }}
run: cd proptest && cargo build --no-default-features --features fork
- name: Build lib std no-default-features
if: ${{ matrix.build == 'stable' }}
run: cd proptest && cargo build --lib --no-default-features --features std
- name: Build rng no-default-features
if: ${{ matrix.build == 'nightly' }}
run: cd proptest && cargo build --no-default-features --features "no_std alloc unstable hardware-rng"
- name: Run persistence tests
if: ${{ matrix.build == 'nightly' }}
run: cd proptest/test-persistence-location && ./run-tests.sh
- name: Clean
run: cargo clean
- name: Build derive
run: cd proptest-derive && cargo build
- name: Clean and Run tests for derive
if: ${{ matrix.build == 'nightly' }}
run: cd proptest-derive && cargo clean && cargo test
- name: Clean and Run tests for derive with features enabled
if: ${{ matrix.build == 'nightly' }}
run: cd proptest-derive && cargo clean && cargo test --features boxed_union
- name: Run state machine tests
if: ${{ matrix.build != 'pinned' }}
run: cd proptest-state-machine && cargo test --verbose
# State machine testing on MSRV 1.82, until the general MSRV
# is caught up to 1.82.0
state-machine:
name: State Machine (MSRV 1.82)
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install Rust 1.82.0
uses: hecrj/setup-rust-action@v1
with:
rust-version: 1.82.0
- name: Build state machine
run: cd proptest-state-machine && cargo build --verbose
- name: Run state machine tests
run: cd proptest-state-machine && cargo test --verbose