name: Build
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Build
run: cargo build --verbose
- run: rustup component add clippy
if: matrix.rust == 'beta' || matrix.rust == 'stable'
- working-directory: ${{ matrix.conf.name }}
name: clippy ${{ matrix.conf.name }}
run: cargo clippy --all-targets -- -D warnings
if: matrix.rust == 'beta' || matrix.rust == 'stable'
- name: Run tests
run: cargo test --verbose