expressive/.github/workflows/ci.yml

101 lines
2.6 KiB
YAML
Raw Normal View History

2021-06-02 14:04:49 +00:00
name: Continuous Integration
on: [push, pull_request]
jobs:
2021-06-02 15:00:50 +00:00
build_test_format_lint:
2021-06-02 14:16:59 +00:00
name: ${{matrix.command.name}} (${{matrix.toolchain}})
2021-06-02 14:04:49 +00:00
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
2021-07-13 11:56:15 +00:00
toolchain: [stable, beta, nightly, 1.46.0]
command:
- name: Check
command: check
2021-06-02 15:17:05 +00:00
args: --all-features
2021-06-02 14:29:30 +00:00
components: ""
- name: Test
command: test
2021-06-02 15:17:05 +00:00
args: --all-features
2021-06-02 14:29:30 +00:00
components: ""
2021-06-02 14:21:55 +00:00
include:
- toolchain: nightly
command:
name: Format
command: fmt
args: --all -- --check
2021-06-02 14:29:30 +00:00
components: rustfmt
- toolchain: nightly
2021-06-02 14:30:43 +00:00
command:
name: Lint
command: clippy
args: --all-features --tests --benches
2021-06-02 14:30:43 +00:00
components: clippy
2021-06-02 14:04:49 +00:00
steps:
- uses: actions/checkout@v2
- name: ⚡ Cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
2021-06-02 15:00:50 +00:00
- name: Install toolchain
uses: actions-rs/toolchain@v1
2021-06-02 14:04:49 +00:00
with:
toolchain: ${{ matrix.toolchain }}
2021-06-02 14:21:55 +00:00
override: true
default: true
2021-06-02 14:29:30 +00:00
components: ${{matrix.command.components}}
2021-06-02 14:04:49 +00:00
- name: ${{matrix.command.name}}
2021-06-02 14:04:49 +00:00
uses: actions-rs/cargo@v1
with:
command: ${{matrix.command.command}}
2021-06-02 15:00:50 +00:00
args: ${{matrix.command.args}}
coveralls_io:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ⚡ Cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
default: true
- name: Install cargo-tarpaulin
uses: actions-rs/install@v0.1
with:
crate: cargo-tarpaulin
version: latest
use-tool-cache: true
- name: Coverage Report with tarpaulin
uses: actions-rs/cargo@v1
with:
command: tarpaulin
2021-06-02 15:10:09 +00:00
args: --all --all-features --out Lcov -- --test-threads 1
2021-06-02 15:00:50 +00:00
- name: Upload Coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov.info