zebra/.github/workflows/ci.yml

85 lines
1.9 KiB
YAML
Raw Normal View History

name: CI
on:
pull_request:
branches:
- main
jobs:
test:
name: Build & test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: cargo fetch
uses: actions-rs/cargo@v1
with:
command: fetch
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --all
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose --release
2020-01-23 13:40:32 -08:00
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
2020-01-24 12:09:01 -08:00
with:
toolchain: nightly
components: clippy
override: true
2020-02-04 21:34:38 -08:00
- name: Run clippy
uses: actions-rs/clippy-check@v1
2020-02-04 21:34:38 -08:00
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets -- -D warnings
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
coverage:
2020-07-24 15:43:56 -07:00
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Run cargo-tarpaulin
uses: actions-rs/tarpaulin@v0.1
with:
version: 'latest'
timeout: 600
- name: Upload coverage report to Codecov
2020-07-24 15:43:56 -07:00
uses: codecov/codecov-action@v1.0.12