From 89ee0347ed09028a4231a757b45ccde56d16ee89 Mon Sep 17 00:00:00 2001 From: Dylan Knutson Date: Thu, 13 Jun 2024 10:25:23 -0700 Subject: [PATCH] add demo workflow --- .gitea/workflows/build-and-test.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .gitea/workflows/build-and-test.yaml diff --git a/.gitea/workflows/build-and-test.yaml b/.gitea/workflows/build-and-test.yaml new file mode 100644 index 0000000..4e37677 --- /dev/null +++ b/.gitea/workflows/build-and-test.yaml @@ -0,0 +1,26 @@ +name: Build & Test +run-name: Build & Test +on: [push, pull_request] + +jobs: + build-and-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Rust + id: rust-toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Cache build artifacts + uses: actions/cache@v3 + with: + key: ${{ runner.os }}-cargo-${{ steps.rust-toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo-${{ steps.rust-toolchain.outputs.cachekey }}- + path: | + **/target + + - name: Build + run: cargo build + - name: Test + run: cargo test