Skip to content

Commit

Permalink
new(ci): add a PR workflow to run tests and render docs
Browse files Browse the repository at this point in the history
Signed-off-by: Grzegorz Nosek <[email protected]>
  • Loading branch information
gnosek committed Oct 22, 2024
1 parent 690f19b commit 54228d5
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: PR
on:
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
test:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
env:
RUSTFLAGS: -D warnings
strategy:
fail-fast: false
matrix:
tag: [ default_features, all_features ]
include:
- tag: default_features
name: Test with default features enabled
cargo_test_opts: ""
- tag: all_features
name: Test with all features enabled
cargo_test_opts: "--all-features"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Build and test
run: cargo test ${{ matrix.cargo_test_opts }}

render_docs:
name: Render docs
runs-on: ubuntu-latest
env:
RUSTFLAGS: -D warnings
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Build docs
run: cargo doc --all-features --no-deps

0 comments on commit 54228d5

Please sign in to comment.