2020-07-13 23:16:15 +00:00
|
|
|
on: push
|
|
|
|
|
|
|
|
name: CI
|
|
|
|
|
|
|
|
jobs:
|
2020-07-14 00:14:08 +00:00
|
|
|
test:
|
2020-07-13 23:16:15 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
2021-01-25 17:11:01 +00:00
|
|
|
toolchain: stable
|
2020-07-13 23:16:15 +00:00
|
|
|
override: true
|
|
|
|
components: rustfmt, clippy
|
|
|
|
|
2020-07-14 00:04:40 +00:00
|
|
|
- name: Rustfmt
|
|
|
|
uses: actions-rs/cargo@v1
|
2020-07-13 23:16:15 +00:00
|
|
|
with:
|
|
|
|
command: fmt
|
|
|
|
args: --all -- --check
|
|
|
|
|
2020-07-14 00:04:40 +00:00
|
|
|
- name: Clippy
|
|
|
|
uses: actions-rs/cargo@v1
|
2020-07-13 23:16:15 +00:00
|
|
|
with:
|
|
|
|
command: clippy
|
|
|
|
args: --all-features --profile test -- -D warnings
|
|
|
|
|
2020-07-14 00:04:40 +00:00
|
|
|
- name: Test
|
|
|
|
uses: actions-rs/cargo@v1
|
2020-07-13 23:16:15 +00:00
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
args: --all-features
|
|
|
|
|
|
|
|
build-release:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
2021-01-25 17:11:01 +00:00
|
|
|
toolchain: stable
|
2020-07-13 23:16:15 +00:00
|
|
|
override: true
|
|
|
|
|
2020-07-14 00:04:40 +00:00
|
|
|
- name: Build (release)
|
|
|
|
uses: actions-rs/cargo@v1
|
2020-07-13 23:16:15 +00:00
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
args: --all-features --release
|
2020-07-14 00:04:40 +00:00
|
|
|
|
|
|
|
codecov:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
2021-01-25 17:11:01 +00:00
|
|
|
toolchain: stable
|
2020-07-14 00:04:40 +00:00
|
|
|
override: true
|
|
|
|
|
|
|
|
- uses: actions-rs/tarpaulin@v0.1
|
|
|
|
|
|
|
|
- uses: codecov/codecov-action@v1
|
|
|
|
with:
|
|
|
|
token: ${{secrets.CODECOV_TOKEN}}
|