2020-03-01 13:56:14 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2020-04-15 03:15:30 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
2020-03-01 13:56:14 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-03-20 15:32:02 +00:00
|
|
|
- name: Check format
|
|
|
|
run: cargo fmt --all -- --check
|
2020-03-21 01:32:13 +00:00
|
|
|
- name: Check with clippy
|
|
|
|
run: cargo clippy --all
|
2020-03-20 15:32:02 +00:00
|
|
|
- name: Build
|
|
|
|
run: cargo build --all --verbose
|
2020-03-01 13:56:14 +00:00
|
|
|
- name: Run tests
|
|
|
|
run: cargo test --all --verbose
|
2020-04-05 08:22:13 +00:00
|
|
|
cover:
|
2020-04-15 03:15:30 +00:00
|
|
|
needs: [build]
|
2020-04-05 08:22:13 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2020-04-05 08:29:11 +00:00
|
|
|
toolchain: stable
|
2020-04-05 08:22:13 +00:00
|
|
|
override: true
|
|
|
|
- name: Install libsqlite3-dev
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y libsqlite3-dev
|
|
|
|
- name: Run cargo-tarpaulin
|
|
|
|
uses: actions-rs/tarpaulin@v0.1
|
|
|
|
with:
|
|
|
|
version: '0.11.0'
|
|
|
|
args: --out Xml --all --all-features
|
|
|
|
- name: Upload to codecov.io
|
|
|
|
uses: codecov/codecov-action@v1.0.2
|
|
|
|
with:
|
|
|
|
token: ${{secrets.CODECOV_TOKEN}}
|
|
|
|
- name: Archive code coverage results
|
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
|
|
|
name: code-coverage-report
|
|
|
|
path: cobertura.xml
|