73 lines
1.5 KiB
YAML
73 lines
1.5 KiB
YAML
|
name: CI
|
||
|
|
||
|
on: [push, pull_request]
|
||
|
|
||
|
jobs:
|
||
|
check:
|
||
|
runs-on: ubuntu-latest
|
||
|
|
||
|
env:
|
||
|
RUSTFLAGS: "-D warnings"
|
||
|
|
||
|
steps:
|
||
|
- name: Checkout sources
|
||
|
uses: actions/checkout@v2
|
||
|
|
||
|
- name: Install stable toolchain
|
||
|
uses: actions-rs/toolchain@v1
|
||
|
with:
|
||
|
profile: minimal
|
||
|
toolchain: stable
|
||
|
override: true
|
||
|
|
||
|
- name: Run cargo check
|
||
|
uses: actions-rs/cargo@v1
|
||
|
with:
|
||
|
command: check --all --all-features --all-targets
|
||
|
|
||
|
test:
|
||
|
runs-on: ${{ matrix.os }}
|
||
|
strategy:
|
||
|
matrix:
|
||
|
os: [ubuntu-latest, macOS-latest, windows-latest]
|
||
|
rust: [stable]
|
||
|
|
||
|
env:
|
||
|
RUSTFLAGS: "-D warnings"
|
||
|
|
||
|
steps:
|
||
|
- uses: actions-rs/toolchain@v1
|
||
|
with:
|
||
|
toolchain: ${{ matrix.rust }}
|
||
|
profile: minimal
|
||
|
- uses: actions/checkout@master
|
||
|
- name: Test
|
||
|
run: cargo test --all --all-features
|
||
|
|
||
|
lints:
|
||
|
name: Lints
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- name: Checkout sources
|
||
|
uses: actions/checkout@v2
|
||
|
|
||
|
- name: Install stable toolchain
|
||
|
uses: actions-rs/toolchain@v1
|
||
|
with:
|
||
|
profile: minimal
|
||
|
toolchain: stable
|
||
|
override: true
|
||
|
components: rustfmt, clippy
|
||
|
|
||
|
- name: Run cargo fmt
|
||
|
uses: actions-rs/cargo@v1
|
||
|
with:
|
||
|
command: fmt
|
||
|
args: --all -- --check
|
||
|
|
||
|
- name: Run cargo clippy
|
||
|
uses: actions-rs/cargo@v1
|
||
|
with:
|
||
|
command: clippy
|
||
|
args: -- -D warnings
|