2019-11-25 16:53:06 +01:00
|
|
|
on: [push, pull_request]
|
2019-09-09 21:39:16 +02:00
|
|
|
|
|
|
|
jobs:
|
2020-11-23 14:11:01 +01:00
|
|
|
|
|
|
|
rustfmt:
|
|
|
|
name: Rustfmt
|
2019-09-09 21:39:16 +02:00
|
|
|
runs-on: ubuntu-latest
|
2019-11-25 16:53:06 +01:00
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
2020-11-23 14:11:01 +01:00
|
|
|
uses: actions/checkout@v2
|
2019-11-25 16:53:06 +01:00
|
|
|
|
|
|
|
- name: Install stable toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
2020-11-23 14:11:01 +01:00
|
|
|
profile: minimal
|
2019-11-25 16:53:06 +01:00
|
|
|
override: true
|
2020-11-23 14:11:01 +01:00
|
|
|
components: rustfmt
|
2019-11-25 16:53:06 +01:00
|
|
|
|
2020-11-23 14:11:01 +01:00
|
|
|
- name: Cache cargo registry, index and build directory
|
|
|
|
uses: actions/cache@v2
|
2019-11-25 16:53:06 +01:00
|
|
|
with:
|
2020-11-23 14:11:01 +01:00
|
|
|
path: |
|
|
|
|
~/.cargo/registry
|
|
|
|
~/.cargo/git
|
|
|
|
./target
|
2020-11-23 14:19:11 +01:00
|
|
|
key: rustfmt-${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
2019-11-25 16:53:06 +01:00
|
|
|
|
|
|
|
- name: Check Formatting
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: fmt
|
|
|
|
args: --all -- --check
|
|
|
|
|
2020-11-23 14:11:01 +01:00
|
|
|
clippy:
|
|
|
|
name: Clippy
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install stable toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
profile: minimal
|
|
|
|
override: true
|
|
|
|
components: rustfmt
|
|
|
|
|
|
|
|
- name: Cache cargo registry, index and build directory
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cargo/registry
|
|
|
|
~/.cargo/git
|
|
|
|
./target
|
2020-11-23 14:19:11 +01:00
|
|
|
key: clippy-${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
2019-11-25 16:53:06 +01:00
|
|
|
|
|
|
|
- name: Clippy Linting
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: clippy
|
|
|
|
args: -- -D warnings
|
|
|
|
|
2020-11-23 14:11:01 +01:00
|
|
|
|
2019-11-25 16:53:06 +01:00
|
|
|
test:
|
2020-11-23 14:11:01 +01:00
|
|
|
name: Test Suite
|
2019-11-25 16:53:06 +01:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
# add windows-latest when it is clear why tests are failing
|
|
|
|
os: [ubuntu-latest, macos-latest]
|
2019-09-09 21:39:16 +02:00
|
|
|
|
|
|
|
steps:
|
2019-11-25 16:53:06 +01:00
|
|
|
- name: Checkout sources
|
2020-11-23 14:11:01 +01:00
|
|
|
uses: actions/checkout@v2
|
2019-11-25 16:53:06 +01:00
|
|
|
|
|
|
|
- name: Install stable toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
2020-11-23 14:11:01 +01:00
|
|
|
profile: minimal
|
2019-11-25 16:53:06 +01:00
|
|
|
override: true
|
|
|
|
|
2020-11-23 14:11:01 +01:00
|
|
|
- name: Cache cargo registry, index and build directory
|
|
|
|
uses: actions/cache@v2
|
2019-11-25 16:53:06 +01:00
|
|
|
with:
|
2020-11-23 14:11:01 +01:00
|
|
|
path: |
|
|
|
|
~/.cargo/registry
|
|
|
|
~/.cargo/git
|
|
|
|
./target
|
2020-11-23 14:19:11 +01:00
|
|
|
key: test-${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
2019-11-25 16:53:06 +01:00
|
|
|
|
|
|
|
- name: Run Tests
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|