chore: Add CI and prepare for tests in CD repo #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "test" | |
on: | |
pull_request: | |
paths-ignore: | |
- "**.md" | |
- ".github/**" | |
- "!.github/workflows/run-tests.yml" | |
- "!.github/workflows/tests.yml" | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.ref }}" | |
cancel-in-progress: true | |
jobs: | |
nox: | |
uses: ./.github/workflows/tests.yml | |
with: | |
ref: ${{ github.ref }} | |
lints: | |
runs-on: builder | |
env: | |
RUSTFLAGS: "-D warnings" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Rust toolchain | |
uses: dsherret/rust-toolchain-file@v1 | |
- name: Setup cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: frpc | |
save-if: false | |
- name: Run cargo check | |
run: cargo check | |
- name: Run cargo clippy | |
uses: giraffate/clippy-action@v1 | |
with: | |
reporter: github-pr-review | |
clippy_flags: -Z unstable-options --all | |
fail_on_error: true | |
- name: Run cargo fmt | |
uses: actions-rust-lang/rustfmt@v1 |