Use a local copy of the release-action GitHub action and make PRs check the release workflow #11
Workflow file for this run
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: Rust CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- "release/**" | |
schedule: | |
- cron: "11 7 * * 1,4" | |
env: | |
RUSTFLAGS: -Dwarnings | |
jobs: | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
components: rustfmt | |
override: true | |
- name: rustfmt | |
run: cargo fmt --all -- --check | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
components: clippy | |
override: true | |
- name: clippy | |
run: cargo clippy --workspace --tests --examples | |
env: | |
PWD: ${{ env.GITHUB_WORKSPACE }} | |
docs: | |
runs-on: ubuntu-latest | |
env: | |
RUSTDOCFLAGS: -Dwarnings | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
components: rust-docs | |
override: true | |
- name: doc | |
run: cargo doc --workspace --no-deps | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
rust: [nightly, stable] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
profile: minimal | |
override: true | |
- name: test | |
run: cargo test --workspace | |
env: | |
PWD: ${{ env.GITHUB_WORKSPACE }} | |
- name: test-all-features | |
run: cargo test --workspace --all-features | |
env: | |
PWD: ${{ env.GITHUB_WORKSPACE }} | |
- name: test-examples-bins | |
run: cargo test --workspace --examples --bins | |
env: | |
PWD: ${{ env.GITHUB_WORKSPACE }} | |
- name: test-all-features-examples-bins | |
run: cargo test --workspace --all-features --examples --bins | |
env: | |
PWD: ${{ env.GITHUB_WORKSPACE }} |