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: run-tests:
runs-on: docker runs-on: docker
steps: steps:
-
name: Installing Node
run: apt update && apt install -y nodejs
- -
name: Add Clippy name: Add Clippy
run: rustup component add clippy run: rustup component add clippy
@ -19,6 +22,17 @@ jobs:
- -
name: Change To Rust Root Dir name: Change To Rust Root Dir
run: cd src-tauri 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 name: Run Clippy
run: cargo clippy run: cargo clippy
@ -64,6 +78,30 @@ jobs:
- -
name: Checking Out Repository Code name: Checking Out Repository Code
uses: https://code.forgejo.org/actions/checkout@v3 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 name: Install Yarn Packages
run: yarn install run: yarn install

View file

@ -10,6 +10,7 @@ on:
jobs: jobs:
run-tests: run-tests:
runs-on: docker runs-on: docker
container: rust:latest
steps: steps:
- -
name: Installing Node name: Installing Node
@ -23,6 +24,17 @@ jobs:
- -
name: Change To Rust Root Dir name: Change To Rust Root Dir
run: cd src-tauri 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 name: Run Clippy
run: cargo clippy run: cargo clippy