name: CI
on: [push, pull_request]
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
rust: 1.51.0
runs-on: ${{ matrix.os }}
steps:
- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- name: Checkout
uses: actions/checkout@v2
- name: Test
run: cargo test --features array_into_iter
test-noarray:
name: Test no_array
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
rust: 1.40.0
runs-on: ${{ matrix.os }}
steps:
- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- name: Checkout
uses: actions/checkout@v2
- name: Test
run: cargo test
lint:
name: Linting (fmt + clippy)
runs-on: ubuntu-latest
steps:
- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt, clippy
- name: Checkout
uses: actions/checkout@v2
- name: Clippy
run: cargo clippy -- -D warnings
- name: Format check
run: cargo fmt -- --check