62 lines
1.3 KiB
YAML
62 lines
1.3 KiB
YAML
name: Test Rust
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
clippy:
|
|
name: Clippy ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
- macOS-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
override: true
|
|
profile: minimal
|
|
components: clippy
|
|
|
|
- name: Run clippy
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: clippy
|
|
args: --verbose --all-targets --all-features -- -D clippy::all -D clippy::pedantic
|
|
|
|
test:
|
|
name: Test ${{ matrix.os }} ${{ matrix.toolchain }}
|
|
runs-on: ${{ matrix.os }}
|
|
needs: clippy
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
- macOS-latest
|
|
toolchain:
|
|
- stable
|
|
- nightly
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ matrix.toolchain }}
|
|
profile: minimal
|
|
override: true
|
|
|
|
- name: Run tests
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --verbose --all-features
|