Publish dry run ci #59
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: Test | |
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
merge_group: | |
permissions: | |
contents: read | |
env: | |
MSRV : "1.70" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
- beta | |
- nightly | |
cargo-update: | |
- true | |
include: | |
- rust: stable | |
cargo-update: false | |
- rust: $MSRV | |
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 | |
publish_dry_run: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Dry run lalrpop-util (cargo publish) | |
run: cargo publish --dry-run -p lalrpop-util | |
- name: Dry run lalrpop (cargo publish) | |
run: cargo publish --dry-run -p lalrpop | |
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: $MSRV | |
- name: Install cargo-hack | |
uses: taiki-e/install-action@cargo-hack | |
- 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 |