2023-12-01 23:59:31 +00:00
|
|
|
name: test
|
|
|
|
run-name: test
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- '*'
|
|
|
|
jobs:
|
|
|
|
clippy:
|
|
|
|
runs-on: ubuntu-latest
|
2023-12-03 14:46:05 +00:00
|
|
|
container:
|
|
|
|
image: git.nanobyte.cz/nanobyte/nano-rust-builder:1.74.5f84654
|
2023-12-01 23:59:31 +00:00
|
|
|
steps:
|
|
|
|
- uses: https://github.com/actions/checkout.git@v4
|
2023-12-03 14:46:05 +00:00
|
|
|
- name: Hash of Cargo.lock
|
|
|
|
id: get-hash
|
|
|
|
run: echo "::set-output name=hash::$(md5sum Cargo.lock | awk '{ print $1; }')"
|
2023-12-01 23:59:31 +00:00
|
|
|
- uses: https://gitea.com/wolfogre/cache/restore@v3
|
|
|
|
id: cache
|
|
|
|
with:
|
2023-12-03 14:46:05 +00:00
|
|
|
key: "${{github.repository}}-cache-cargo-clippy-v4-${{ steps.get-hash.outputs.hash }}"
|
2023-12-01 23:59:31 +00:00
|
|
|
path: |
|
|
|
|
.cache
|
|
|
|
target
|
|
|
|
restore-keys: ${{github.repository}}-cache-cargo-clippy-v4
|
|
|
|
- uses: nanobyte-public/rust-action@master
|
|
|
|
with:
|
2023-12-03 18:22:18 +00:00
|
|
|
args: CARGO_HOME=./.cache cargo-nan \"Bearer ${{secrets.deployment_package}}\" cargo clippy -- -Dwarnings
|
2023-12-01 23:59:31 +00:00
|
|
|
- uses: https://gitea.com/wolfogre/cache/save@v3
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
.cache
|
|
|
|
target
|
2023-12-03 14:46:05 +00:00
|
|
|
key: "${{github.repository}}-cache-cargo-clippy-v4-${{ steps.get-hash.outputs.hash }}"
|
2023-12-01 23:59:31 +00:00
|
|
|
test:
|
2023-12-03 14:46:05 +00:00
|
|
|
container:
|
|
|
|
image: git.nanobyte.cz/nanobyte/nano-rust-builder:1.74.5f84654
|
2023-12-01 23:59:31 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: https://github.com/actions/checkout.git@v4
|
2023-12-03 14:46:05 +00:00
|
|
|
- name: Hash of Cargo.lock
|
|
|
|
id: get-hash
|
|
|
|
run: echo "::set-output name=hash::$(md5sum Cargo.lock | awk '{ print $1; '})"
|
2023-12-01 23:59:31 +00:00
|
|
|
- uses: https://gitea.com/wolfogre/cache/restore@v3
|
|
|
|
id: cache
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
.cache
|
|
|
|
target
|
2023-12-03 14:46:05 +00:00
|
|
|
key: "${{github.repository}}-cache-test-clippy-v4-${{ steps.get-hash.outputs.hash }}"
|
|
|
|
restore-keys: ${{github.repository}}-cache-test-test-v4
|
2023-12-01 23:59:31 +00:00
|
|
|
- uses: nanobyte-public/rust-action@master
|
|
|
|
with:
|
|
|
|
args: |
|
2023-12-03 18:22:18 +00:00
|
|
|
CARGO_HOME=./.cache cargo-nan \"Bearer ${{secrets.deployment_package}}\" cargo test
|
2023-12-01 23:59:31 +00:00
|
|
|
- uses: https://gitea.com/wolfogre/cache/save@v3
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
.cache
|
|
|
|
target
|
2023-12-03 14:46:05 +00:00
|
|
|
key: "${{github.repository}}-cache-test-clippy-v4-${{ steps.get-hash.outputs.hash }}"
|