Files
contextswitch/.github/workflows/ci.yml

58 lines
1.4 KiB
YAML

on: [push]
name: CI
jobs:
format:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rustfmt
override: true
- uses: LoliGothick/rustfmt-check@v0.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
flags: --all
options: --manifest-path=Cargo.toml
build_and_test:
name: Build & test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
- uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --tests -- -D warnings
- name: Run cargo-tarpaulin
uses: ./.github/actions/cargo-tarpaulin-action/
with:
args: '-- --test-threads 1'
- 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