Skip to content

update CI

update CI #91

Workflow file for this run

name: CI
on: [push, pull_request]
env:
RUST_MINVERSION: 1.65.0
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- nightly
features:
- ''
include:
- rust: stable
features: ''
- rust: stable
features: '--features "std"'
- rust: stable
features: '--no-default-features'
- rust: stable
features: '--no-default-features --features "alloc"'
- rust: nightly
features: ''
- rust: nightly
features: '--no-default-features'
- rust: nightly
features: '--no-default-features --features "alloc"'
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install rust (${{ matrix.rust }})
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- name: Cache
uses: Swatinem/rust-cache@v1
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose ${{ matrix.features }}
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose ${{ matrix.features }}
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Cache
uses: Swatinem/rust-cache@v1
- name: Install cargo-tarpaulin
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-tarpaulin
- name: Run cargo tarpaulin
uses: actions-rs/cargo@v1
with:
command: tarpaulin
args: --output-dir coverage --out xml --workspace --exclude benchmarks
- name: Publish to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}