async-graphql/.github/workflows/ci.yml
2020-04-05 16:29:11 +08:00

48 lines
1.2 KiB
YAML

name: CI
on:
push:
branches:
- master
pull_request: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Check format
run: cargo fmt --all -- --check
- name: Check with clippy
run: cargo clippy --all
- name: Build
run: cargo build --all --verbose
- name: Run tests
run: cargo test --all --verbose
cover:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
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