2022-10-11 09:42:41 +02:00
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
schedule:
|
|
|
|
- cron: "0 0 * * *"
|
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
|
2023-09-04 16:34:39 +02:00
|
|
|
uses: actions/checkout@v4
|
2019-11-25 16:53:06 +01:00
|
|
|
|
|
|
|
- name: Install stable toolchain
|
2023-06-13 09:59:33 +02:00
|
|
|
uses: dtolnay/rust-toolchain@stable
|
2019-11-25 16:53:06 +01:00
|
|
|
|
|
|
|
- name: Check Formatting
|
2023-06-13 09:59:33 +02:00
|
|
|
run: cargo fmt --all -- --check
|
|
|
|
|
2019-11-25 16:53:06 +01:00
|
|
|
|
2020-11-23 14:11:01 +01:00
|
|
|
clippy:
|
|
|
|
name: Clippy
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
2023-09-04 16:34:39 +02:00
|
|
|
uses: actions/checkout@v4
|
2020-11-23 14:11:01 +01:00
|
|
|
|
|
|
|
- name: Install stable toolchain
|
2023-06-13 09:59:33 +02:00
|
|
|
uses: dtolnay/rust-toolchain@stable
|
2020-11-23 14:11:01 +01:00
|
|
|
|
|
|
|
- name: Cache cargo registry, index and build directory
|
2022-10-11 09:42:41 +02:00
|
|
|
uses: actions/cache@v3
|
2020-11-23 14:11:01 +01:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cargo/registry
|
|
|
|
~/.cargo/git
|
|
|
|
./target
|
2022-10-11 09:42:41 +02:00
|
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
2019-11-25 16:53:06 +01:00
|
|
|
|
|
|
|
- name: Clippy Linting
|
2023-07-27 10:37:23 +02:00
|
|
|
run: cargo clippy --all-features -- -Dclippy::all -Dclippy::pedantic
|
2023-06-13 09:59:33 +02:00
|
|
|
- name: Clippy Test Linting
|
2023-07-27 10:37:23 +02:00
|
|
|
run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic
|
2019-11-25 16:53:06 +01:00
|
|
|
|
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
|
2021-03-29 12:55:49 +02:00
|
|
|
# os: [ubuntu-latest, macos-latest]
|
|
|
|
os: [ubuntu-latest]
|
2019-09-09 21:39:16 +02:00
|
|
|
|
|
|
|
steps:
|
2019-11-25 16:53:06 +01:00
|
|
|
- name: Checkout sources
|
2023-09-04 16:34:39 +02:00
|
|
|
uses: actions/checkout@v4
|
2019-11-25 16:53:06 +01:00
|
|
|
|
|
|
|
- name: Install stable toolchain
|
2023-06-13 09:59:33 +02:00
|
|
|
uses: dtolnay/rust-toolchain@stable
|
2019-11-25 16:53:06 +01:00
|
|
|
|
2020-11-23 14:11:01 +01:00
|
|
|
- name: Cache cargo registry, index and build directory
|
2022-10-11 09:42:41 +02:00
|
|
|
uses: actions/cache@v3
|
2019-11-25 16:53:06 +01:00
|
|
|
with:
|
2020-11-23 14:11:01 +01:00
|
|
|
path: |
|
|
|
|
~/.cargo/registry
|
|
|
|
~/.cargo/git
|
|
|
|
./target
|
2022-10-11 09:42:41 +02:00
|
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
2019-11-25 16:53:06 +01:00
|
|
|
|
|
|
|
- name: Run Tests
|
2023-06-13 09:59:33 +02:00
|
|
|
run: cargo test
|