name: ci
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
name: test
runs-on: ubuntu-latest
strategy:
matrix:
build:
- stable
- nightly
include:
- build: reference
rust: 1.40.0
features: ""
- build: stable
rust: stable
- build: nightly
rust: nightly
features:
- ""
- "const-loop"
steps:
- name: checkout
uses: actions/checkout@v2
- name: install
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- name: build
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose --features=${{ matrix.features }}
- name: run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --features=${{ matrix.features }}
fmt:
name: format
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: install
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
components: rustfmt, clippy
- name: build
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose
- name: run format check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check