Skip to content

chore(deps): update actions/setup-python action to v5 (#50) #103

chore(deps): update actions/setup-python action to v5 (#50)

chore(deps): update actions/setup-python action to v5 (#50) #103

Workflow file for this run

name: Build and test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
RUST_VERSION: 1.72.1
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest", "ubuntu-20.04", "macos-12" ]
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}
- name: Install dependencies ubuntu
if: ${{ matrix.os == 'ubuntu-20.04' || matrix.os == 'ubuntu-latest' }}
run: make install-deps-apt
- name: Install dependencies macos
if: ${{ matrix.os == 'macos-12' }}
run: make install-deps-brew
- name: Build & Test (Debug)
run: cargo test
- name: Build & Test (Release)
run: cargo test --release
doc-rs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
components: clippy, rustfmt
- name: Install dependencies ubuntu
run: make install-deps-apt
- name: Generate Doc
env:
DOCS_RS: 1
run: cargo doc -v
pre-commit:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
components: clippy, rustfmt
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install pre-commit
run: pip install pre-commit
- name: Pre-commit
run: |
pre-commit install --install-hooks
pre-commit run --all --show-diff-on-failure