2023-06-01 11:47:58 +12:00
|
|
|
name: Pull Request
|
|
|
|
|
2023-12-31 15:46:37 +13:00
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
NEXTEST_RETRIES: 10
|
|
|
|
|
2023-06-01 11:47:58 +12:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'main'
|
|
|
|
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- 'main'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: cargo test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Install stable toolchain
|
|
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
|
2024-01-01 07:26:46 +13:00
|
|
|
- name: Install cargo-nextest
|
2023-12-31 15:46:37 +13:00
|
|
|
uses: taiki-e/install-action@nextest
|
2023-06-01 11:47:58 +12:00
|
|
|
|
2024-01-01 07:26:46 +13:00
|
|
|
- name: Run cargo nextest
|
|
|
|
run: cargo nextest run
|
|
|
|
|
2023-06-01 11:47:58 +12:00
|
|
|
format:
|
|
|
|
name: cargo fmt --all -- --check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Install stable toolchain with rustfmt component
|
|
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
components: rustfmt
|
|
|
|
|
|
|
|
- name: Run cargo fmt
|
|
|
|
run: cargo fmt --all -- --check
|
|
|
|
|
|
|
|
clippy:
|
|
|
|
name: cargo clippy -- -D warnings
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Install stable toolchain with clippy component
|
|
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
components: clippy
|
|
|
|
|
|
|
|
- name: Run cargo clippy
|
|
|
|
run: cargo clippy -- -D warnings
|