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:
|
2021-06-11 15:05:29 -07:00
|
|
|
name: Build & Test (+nightly) / ${{ matrix.os }}
|
2020-05-04 13:48:31 -07:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
|
|
|
|
|
|
|
steps:
|
2022-03-16 18:01:39 -07:00
|
|
|
- uses: actions/checkout@v3.0.0
|
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: Build (+nightly)
|
2020-05-04 13:48:31 -07:00
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
args: --verbose --release
|
2021-06-11 13:13:47 -07:00
|
|
|
- name: Test (+nightly)
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
args: --verbose --all-features
|
2020-05-04 13:48:31 -07:00
|
|
|
|
|
|
|
|
2021-06-10 20:12:13 -07:00
|
|
|
clippy:
|
|
|
|
name: Clippy (+nightly)
|
2020-05-04 13:48:31 -07:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-16 18:01:39 -07:00
|
|
|
- uses: actions/checkout@v3.0.0
|
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
|
2021-06-10 20:12:13 -07:00
|
|
|
components: clippy
|
2020-05-04 13:48:31 -07:00
|
|
|
override: true
|
2021-06-10 20:12:13 -07:00
|
|
|
- name: Run clippy
|
|
|
|
uses: actions-rs/clippy-check@v1
|
2020-05-07 20:39:59 -07:00
|
|
|
with:
|
2021-06-10 20:12:13 -07:00
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
args: --all-features --all-targets -- -D warnings
|
2020-05-04 13:48:31 -07:00
|
|
|
|
2021-06-10 20:12:13 -07:00
|
|
|
coverage:
|
2021-06-11 14:30:54 -07:00
|
|
|
name: Code Coverage (+nightly)
|
2020-05-04 13:48:31 -07:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-16 18:01:39 -07:00
|
|
|
- uses: actions/checkout@v3.0.0
|
2021-06-11 14:24:10 -07:00
|
|
|
- uses: actions-rs/toolchain@v1.0.7
|
2021-06-10 20:12:13 -07:00
|
|
|
with:
|
2021-06-11 14:30:54 -07:00
|
|
|
toolchain: nightly
|
2021-06-11 15:35:03 -07:00
|
|
|
components: llvm-tools-preview
|
2020-05-04 13:48:31 -07:00
|
|
|
override: true
|
2021-06-11 15:35:03 -07:00
|
|
|
- name: Install rustfilt, cargo-llvm-cov cargo commands
|
|
|
|
run: |
|
|
|
|
cargo install rustfilt
|
|
|
|
cargo install cargo-llvm-cov --version 0.1.0-alpha.3
|
|
|
|
- name: Generate code coverage
|
|
|
|
run: cargo llvm-cov --all-features --lcov > lcov.info
|
2021-06-10 20:12:13 -07:00
|
|
|
- name: Upload coverage report to Codecov
|
2021-09-14 03:01:28 -07:00
|
|
|
uses: codecov/codecov-action@v2.1.0
|