74 lines
1.7 KiB
YAML
74 lines
1.7 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
|
|
test:
|
|
name: Build & Test on ${{ matrix.os }} (+nightly)
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2.3.4
|
|
- uses: actions-rs/toolchain@v1.0.7
|
|
with:
|
|
toolchain: nightly
|
|
override: true
|
|
- name: cargo fetch
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: fetch
|
|
- name: Build (+nightly)
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: build
|
|
args: --verbose --release
|
|
- name: Test (+nightly)
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --verbose --all-features
|
|
|
|
|
|
clippy:
|
|
name: Clippy (+nightly)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2.3.4
|
|
- uses: actions-rs/toolchain@v1.0.7
|
|
with:
|
|
toolchain: nightly
|
|
components: clippy
|
|
override: true
|
|
- name: Run clippy
|
|
uses: actions-rs/clippy-check@v1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
args: --all-features --all-targets -- -D warnings
|
|
|
|
coverage:
|
|
name: Code Coverage (+nightly)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2.3.4
|
|
- uses: actions-rs/toolchain@v1.0.7
|
|
with:
|
|
toolchain: nightly
|
|
override: true
|
|
- name: Run cargo-tarpaulin
|
|
uses: actions-rs/tarpaulin@v0.1.3
|
|
with:
|
|
version: '0.18.0-alpha3'
|
|
timeout: 300
|
|
- name: Upload coverage report to Codecov
|
|
uses: codecov/codecov-action@v1.5.2
|