mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-18 22:32:32 +02:00
use cache approach in pre-test
This commit is contained in:
parent
d783a6172e
commit
2409627fdd
30
.github/workflows/tests.yml
vendored
30
.github/workflows/tests.yml
vendored
@ -18,27 +18,37 @@ on:
|
|||||||
types: [checks_requested]
|
types: [checks_requested]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
checkout:
|
setup:
|
||||||
name: Checkout Repository
|
name: Checkout Repository and Install Dependencies
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
repo-path: ${{ steps.checkout.outputs.repo-path }}
|
package-lock: ${{ steps.checkout.outputs.package-lock }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out Git repository
|
- name: Checkout Git repository
|
||||||
id: checkout
|
id: checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
- name: Cache Node modules
|
||||||
|
id: cache
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.npm
|
||||||
|
**/node_modules
|
||||||
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-node-
|
||||||
|
- name: Install Node.js dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
pre-test:
|
pre-test:
|
||||||
name: Checkout Repository
|
name: Checkout Repository
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: checkout
|
needs: setup
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Node.js
|
- name: Download Checkout Artifacts
|
||||||
uses: actions/setup-node@v4
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ env.NODE_VERSION }}
|
name: repository
|
||||||
- name: Install Node.js dependencies
|
|
||||||
run: npm ci
|
|
||||||
- name: pre-test
|
- name: pre-test
|
||||||
run: npx vitest run --project pre ${{ runner.debug == '1' && '' || '--silent' }}
|
run: npx vitest run --project pre ${{ runner.debug == '1' && '' || '--silent' }}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user