Run release builds on PRs #230
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: CI | |
on: | |
push: | |
branches: | |
- master | |
- "release/**" | |
pull_request: | |
env: | |
RUSTFLAGS: -Dwarnings | |
jobs: | |
lints: | |
name: Style/Linting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rustup toolchain install stable --profile minimal --component rustfmt --component clippy --no-self-update | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo fmt --all -- --check | |
- run: cargo clippy --all-features --workspace --tests --examples -- -D clippy::all | |
# - uses: actions/setup-python@v4 | |
# with: | |
# python-version: "3.10" | |
# - run: make install-py-dev | |
# - run: make style-python | |
# - run: make lint-python | |
doc-comments: | |
name: Documentation | |
runs-on: ubuntu-latest | |
env: | |
RUSTDOCFLAGS: -Dwarnings | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rustup toolchain install stable --profile minimal --component rust-docs --no-self-update | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo doc --workspace --all-features --document-private-items --no-deps | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
name: Tests on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rustup toolchain install stable --profile minimal --no-self-update | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo test --workspace --all-features --all-targets | |
- run: cargo test --workspace --all-features --doc | |
- uses: actions/setup-python@v5 | |
- uses: actions/cache@v3 | |
with: | |
key: venv-${{ runner.os }}-${{ hashFiles('.python-version', 'requirements*.txt') }} | |
path: .venv | |
- run: make install-py-dev | |
- run: pytest -vvs | |
- run: mypy | |
codecov: | |
name: Code Coverage | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rustup toolchain install stable --profile minimal --component llvm-tools-preview --no-self-update | |
- uses: Swatinem/rust-cache@v2 | |
- uses: taiki-e/install-action@cargo-llvm-cov | |
- run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info | |
- uses: codecov/codecov-action@v3 | |
with: | |
files: lcov.info |