2021-07-31 19:57:48 +00:00
|
|
|
name: Unit tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
paths:
|
|
|
|
- '.github/workflows/*'
|
|
|
|
- 'src/**'
|
|
|
|
- 'Cargo.*'
|
|
|
|
- build.rs
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
paths:
|
|
|
|
- '.github/workflows/*'
|
|
|
|
- 'src/**'
|
|
|
|
- 'Cargo.*'
|
|
|
|
- build.rs
|
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
unit-tests:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
continue-on-error: ${{ matrix.rust == 'nightly' }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, macos-latest]
|
2021-08-12 14:46:37 +00:00
|
|
|
rust: [1.56.1, stable, beta, nightly]
|
2021-07-31 19:57:48 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install Rust toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: ${{ matrix.rust }}
|
|
|
|
override: true
|
|
|
|
|
|
|
|
- name: Install cargo-hack
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: install
|
|
|
|
args: cargo-hack
|
|
|
|
|
|
|
|
- name: Run unit tests
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: hack
|
|
|
|
args: test --feature-powerset
|