gitea
This commit is contained in:
parent
b51840d09a
commit
7ea9bbbb5f
53
.gitea/workflows/test.yaml
Normal file
53
.gitea/workflows/test.yaml
Normal file
@ -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') }}
|
Loading…
Reference in New Issue
Block a user