Add GitHub Actions CI workflow

This commit is contained in:
Deirdre Connolly 2020-05-04 16:48:31 -04:00
parent deda610340
commit a417eb0f3f
1 changed files with 66 additions and 0 deletions

66
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,66 @@
name: CI
on: [push]
jobs:
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: cargo fetch
uses: actions-rs/cargo@v1
with:
command: fetch
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --all
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose --release
coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
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
uses: codecov/codecov-action@v1
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Run clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features