From 7ea9bbbb5fc56164a851e465c2c07cc5a634d267 Mon Sep 17 00:00:00 2001 From: Ondrej Vlach Date: Sat, 2 Dec 2023 00:54:47 +0100 Subject: [PATCH] gitea --- .gitea/workflows/test.yaml | 53 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .gitea/workflows/test.yaml diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml new file mode 100644 index 0000000..4314ab3 --- /dev/null +++ b/.gitea/workflows/test.yaml @@ -0,0 +1,53 @@ +name: test +run-name: test +on: + workflow_call: + push: + branches: + - '*' +jobs: + clippy: + runs-on: ubuntu-latest + steps: + - uses: https://github.com/actions/checkout.git@v4 + - uses: https://gitea.com/wolfogre/cache/restore@v3 + id: cache + with: + path: | + .cache + target + key: ${{github.repository}}-cache-cargo-clippy-v4-${{ hashFiles('Cargo.lock') }} + restore-keys: ${{github.repository}}-cache-cargo-clippy-v4 + - uses: nanobyte-public/rust-action@master + with: + args: CARGO_HOME=./.cache cargo clippy -- -Dwarnings + - uses: https://gitea.com/wolfogre/cache/save@v3 + if: steps.cache.outputs.cache-hit != 'true' + with: + path: | + .cache + target + key: ${{github.repository}}-cache-cargo-clippy-v4-${{ hashFiles('Cargo.lock') }} + test: + runs-on: ubuntu-latest + steps: + - uses: https://github.com/actions/checkout.git@v4 + - uses: https://gitea.com/wolfogre/cache/restore@v3 + id: cache + with: + path: | + .cache + target + key: ${{github.repository}}-cache-cargo-test-v4-${{ hashFiles('Cargo.lock') }} + restore-keys: ${{github.repository}}-cache-cargo-test-v4 + - uses: nanobyte-public/rust-action@master + with: + args: | + CARGO_HOME=./.cache cargo test + - uses: https://gitea.com/wolfogre/cache/save@v3 + if: steps.cache.outputs.cache-hit != 'true' + with: + path: | + .cache + target + key: ${{github.repository}}-cache-cargo-test-v4-${{ hashFiles('Cargo.lock') }}