From bfbb73fac151b4923b5600709c2cc4a22e088ec4 Mon Sep 17 00:00:00 2001 From: benthecarman Date: Fri, 15 Sep 2023 17:48:20 -0500 Subject: [PATCH] Add CI --- .github/workflows/test.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..d906d2a --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,39 @@ +name: Tests + +on: + pull_request: + +jobs: + rust_tests: + name: Rust Checks + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + components: clippy, rustfmt + override: true + profile: minimal + + - name: Setup trunk + uses: jetli/trunk-action@v0.1.0 + with: + version: 'latest' + + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: cargo-${{ runner.os }}-rust-tests-${{ hashFiles('**/Cargo.toml') }} + restore-keys: | + cargo-${{ runner.os }}-rust-tests- + cargo-${{ runner.os }}- + + - name: Check formatting + run: cargo fmt --check + + - name: Check clippy + run: cargo clippy