2021-02-14 22:48:52 +03:00
|
|
|
on: [push, pull_request]
|
2020-11-28 15:14:50 +03:00
|
|
|
|
|
|
|
name: CI tests
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
linting:
|
|
|
|
name: Run lints
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-01 22:01:14 +03:00
|
|
|
- uses: actions/checkout@v3
|
2020-11-28 15:14:50 +03:00
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
|
|
|
|
- run: rustup component add rustfmt
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: fmt
|
|
|
|
args: --all -- --check
|
|
|
|
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: check
|
|
|
|
|
|
|
|
- run: rustup component add clippy
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: clippy
|
|
|
|
args: -- -D warnings
|
|
|
|
|
|
|
|
test-linux:
|
|
|
|
name: Test on Linux
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-01 22:01:14 +03:00
|
|
|
- uses: actions/checkout@v3
|
2020-11-28 15:14:50 +03:00
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
|
|
|
|
test-windows:
|
|
|
|
name: Test on Windows
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- run: git config --system core.autocrlf false && git config --system core.eol lf
|
2022-03-01 22:01:14 +03:00
|
|
|
- uses: actions/checkout@v3
|
2020-11-28 15:14:50 +03:00
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
|
|
|
|
coverage:
|
|
|
|
name: Code coverage
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-01 22:01:14 +03:00
|
|
|
- uses: actions/checkout@v3
|
2020-11-28 15:14:50 +03:00
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
- uses: actions-rs/tarpaulin@v0.1
|
|
|
|
with:
|
2023-09-22 12:20:32 +03:00
|
|
|
# Constrained by https://github.com/actions-rs/tarpaulin/pull/23
|
|
|
|
version: "0.22.0"
|
2020-11-28 15:14:50 +03:00
|
|
|
args: "--ignore-tests"
|
|
|
|
out-type: "Html"
|
2022-05-01 22:01:03 +03:00
|
|
|
- uses: actions/upload-artifact@v3
|
2020-11-28 15:14:50 +03:00
|
|
|
with:
|
|
|
|
name: tarpaulin-report
|
|
|
|
path: tarpaulin-report.html
|