Skip to content

CI

CI #150

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: ['master']
schedule:
- cron: '36 3 * * 6' # every Saturday morning
env:
CARGO_UNSTABLE_SPARSE_REGISTRY: 'true'
defaults:
run:
shell: bash
jobs:
test:
name: Test Suite
strategy:
matrix:
rust:
- nightly
- nightly-2023-07-01
- nightly-2023-01-01
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Clear lockfiles (cron jobs only)
if: github.event_name == 'schedule'
# macOS `find` requires the `.`
run: |
for C in $(find . -name Cargo.lock); do
echo "Updating $C"
cargo update --manifest-path $(dirname "$C")/Cargo.toml
done
- name: Run tests
working-directory: test
run: ./ci.sh
check:
name: Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.64.0
components: rustfmt, clippy
- name: rustfmt
run: cargo fmt --check
- name: clippy
run: cargo clippy -- -D warnings