Skip to content

Whoops, I don't think a test feature flag exists (#895) #591

Whoops, I don't think a test feature flag exists (#895)

Whoops, I don't think a test feature flag exists (#895) #591

Workflow file for this run

name: Test
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
merge_group:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- "1.70"
- stable
- beta
- nightly
cargo-update:
- true
include:
- rust: stable
cargo-update: false
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Update
if: matrix.cargo-update
run: cargo update
- name: Run tests
run: ./tools/ci.sh
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt clippy
- name: Run rustfmt check
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy --all --all-targets -- -D warnings
min_version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
- name: Check the minimum possible crate versions
run: rm Cargo.lock && cargo +nightly build -Zdirect-minimal-versions
feature_powerset:
runs-on: ubuntu-latest
# Don't do expensive test if we're just going to fail on linting
needs: lint
env:
CARGO_INCREMENTAL: 1
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Update
run: cargo update
- run: cargo build --bin lalrpop --features pico-args
- name: Run feature powerset check
# test with minimal amount of features plus a few extra on regex/regex-syntax
run: cargo hack test --workspace --feature-powerset --exclude-features pico-args,default --optional-deps