Use caching + switch to rust image for tests
Some checks failed
Run Tests on Code / run-tests (push) Failing after 13s

This commit is contained in:
Neshura 2023-12-19 23:16:38 +01:00
parent 1e688d4ea8
commit 80318dcbe5
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C
2 changed files with 50 additions and 0 deletions

View file

@ -10,6 +10,9 @@ jobs:
run-tests:
runs-on: docker
steps:
-
name: Installing Node
run: apt update && apt install -y nodejs
-
name: Add Clippy
run: rustup component add clippy
@ -19,6 +22,17 @@ jobs:
-
name: Change To Rust Root Dir
run: cd src-tauri
-
name: Set Up Cargo Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
-
name: Run Clippy
run: cargo clippy
@ -64,6 +78,30 @@ jobs:
-
name: Checking Out Repository Code
uses: https://code.forgejo.org/actions/checkout@v3
-
name: Set Up Cargo Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/**/Cargo.lock') }}
-
name: Get Yarn Cache Directory
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
-
name: Set Up Yarn Cache
uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
-
name: Install Yarn Packages
run: yarn install

View file

@ -10,6 +10,7 @@ on:
jobs:
run-tests:
runs-on: docker
container: rust:latest
steps:
-
name: Installing Node
@ -23,6 +24,17 @@ jobs:
-
name: Change To Rust Root Dir
run: cd src-tauri
-
name: Set Up Cargo Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
-
name: Run Clippy
run: cargo clippy