2020-05-04 13:48:31 -07:00
|
|
|
name: CI
|
|
|
|
|
2020-05-08 20:50:02 -07:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
2020-05-04 13:48:31 -07:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
test:
|
|
|
|
name: Test on ${{ matrix.os }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
|
|
|
|
|
|
|
steps:
|
2020-11-04 02:00:51 -08:00
|
|
|
- uses: actions/checkout@v2.3.4
|
2021-05-12 02:01:17 -07:00
|
|
|
- uses: actions-rs/toolchain@v1.0.7
|
2020-05-04 13:48:31 -07:00
|
|
|
with:
|
2021-06-10 19:32:28 -07:00
|
|
|
toolchain: nightly
|
2020-05-04 13:48:31 -07:00
|
|
|
override: true
|
|
|
|
- name: cargo fetch
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: fetch
|
2021-06-10 20:00:45 -07:00
|
|
|
- name: Test (+nightly)
|
2020-05-04 13:48:31 -07:00
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
args: --verbose --all
|
2021-06-10 20:00:45 -07:00
|
|
|
- name: Build (+nightly)
|
2020-05-04 13:48:31 -07:00
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
args: --verbose --release
|
|
|
|
|
2020-05-08 19:21:19 -07:00
|
|
|
doctest-nightly:
|
2021-06-10 20:00:45 -07:00
|
|
|
name: Doctests (+nightly)
|
2020-05-08 19:21:19 -07:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-11-04 02:00:51 -08:00
|
|
|
- uses: actions/checkout@v2.3.4
|
2020-05-08 19:21:19 -07:00
|
|
|
# Because we use nightly features for building docs,
|
|
|
|
# using --all-features will fail without nightly toolchain.
|
2021-05-12 02:01:17 -07:00
|
|
|
- uses: actions-rs/toolchain@v1.0.7
|
2020-05-08 19:21:19 -07:00
|
|
|
with:
|
|
|
|
toolchain: nightly
|
|
|
|
override: true
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
2021-06-10 20:00:45 -07:00
|
|
|
args: --all-features --all-targets
|
2020-05-04 13:48:31 -07:00
|
|
|
|
|
|
|
coverage:
|
2021-06-10 20:00:45 -07:00
|
|
|
name: Code Coverage (+nightly)
|
2020-05-04 13:48:31 -07:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-11-04 02:00:51 -08:00
|
|
|
- uses: actions/checkout@v2.3.4
|
2021-05-12 02:01:17 -07:00
|
|
|
- uses: actions-rs/toolchain@v1.0.7
|
2020-05-04 13:48:31 -07:00
|
|
|
with:
|
2021-06-10 19:32:28 -07:00
|
|
|
toolchain: nightly
|
2020-05-04 13:48:31 -07:00
|
|
|
override: true
|
|
|
|
- name: Run cargo-tarpaulin
|
|
|
|
uses: actions-rs/tarpaulin@v0.1
|
|
|
|
with:
|
|
|
|
version: '0.12.3'
|
|
|
|
timeout: 300
|
|
|
|
- name: Upload coverage report to Codecov
|
2021-05-04 02:01:31 -07:00
|
|
|
uses: codecov/codecov-action@v1.5.0
|
2020-05-07 20:39:59 -07:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
2020-05-04 13:48:31 -07:00
|
|
|
|
|
|
|
clippy:
|
2021-06-10 20:00:45 -07:00
|
|
|
name: Clippy (+nightly)
|
2020-05-04 13:48:31 -07:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-11-04 02:00:51 -08:00
|
|
|
- uses: actions/checkout@v2.3.4
|
2021-05-12 02:01:17 -07:00
|
|
|
- uses: actions-rs/toolchain@v1.0.7
|
2020-05-04 13:48:31 -07:00
|
|
|
with:
|
2021-06-10 19:29:02 -07:00
|
|
|
toolchain: nightly
|
2021-06-10 20:00:45 -07:00
|
|
|
components: clippy
|
2020-05-04 13:48:31 -07:00
|
|
|
override: true
|
|
|
|
- name: Run clippy
|
|
|
|
uses: actions-rs/clippy-check@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2021-06-10 20:00:45 -07:00
|
|
|
args: --all-features --all-targets -- -D warnings
|