name: ci
on:
pull_request:
push:
branches:
- master
schedule:
- cron: '00 01 * * *'
jobs:
test:
name: test
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [pinned, stable, beta, nightly]
include:
- build: pinned
os: ubuntu-18.04
rust: 1.62.0
- build: stable
os: ubuntu-18.04
rust: stable
- build: beta
os: ubuntu-18.04
rust: beta
- build: nightly
os: ubuntu-18.04
rust: nightly
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
override: true
toolchain: ${{ matrix.rust }}
profile: minimal
- run: cargo build --all --verbose
- run: cargo doc --all --verbose
- run: cargo test --all --verbose
- if: matrix.build == 'nightly'
run: cargo bench --all --verbose --no-run
rustfmt:
name: rustfmt
runs-on: ubuntu-18.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
override: true
toolchain: stable
profile: minimal
components: rustfmt
- name: Check formatting
run: |
cargo fmt -- --check