mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-18 22:32:32 +02:00
reduce redundancy by checking out once
This commit is contained in:
parent
a7e5e3c690
commit
e92e41bdaf
56
.github/workflows/tests.yml
vendored
56
.github/workflows/tests.yml
vendored
@ -1,5 +1,8 @@
|
||||
name: Tests
|
||||
|
||||
env:
|
||||
NODE_VERSION: 20
|
||||
|
||||
on:
|
||||
# Trigger the workflow on push or pull request,
|
||||
# but only for the main branch
|
||||
@ -15,23 +18,28 @@ on:
|
||||
types: [checks_requested]
|
||||
|
||||
jobs:
|
||||
run-misc-tests: # Define a job named "run-tests"
|
||||
name: Run misc tests # Human-readable name for the job
|
||||
runs-on: ubuntu-latest # Specify the latest Ubuntu runner for the job
|
||||
|
||||
checkout:
|
||||
name: Checkout Repository
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
repo-path: ${{ steps.checkout.outputs.repo-path }}
|
||||
steps:
|
||||
- name: Check out Git repository # Step to check out the repository
|
||||
uses: actions/checkout@v4 # Use the checkout action version 4
|
||||
- name: Check out Git repository
|
||||
id: checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js # Step to set up Node.js environment
|
||||
uses: actions/setup-node@v4 # Use the setup-node action version 4
|
||||
run-misc-tests:
|
||||
name: Run misc tests
|
||||
runs-on: ubuntu-latest
|
||||
needs: checkout
|
||||
steps:
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20 # Specify Node.js version 20
|
||||
|
||||
- name: Install Node.js dependencies # Step to install Node.js dependencies
|
||||
run: npm ci # Use 'npm ci' to install dependencies
|
||||
|
||||
- name: pre-test # pre-test to check overrides
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
- name: Install Node.js dependencies
|
||||
run: npm ci
|
||||
- name: pre-test
|
||||
run: npx vitest run --project pre ${{ runner.debug == '1' && '' || '--silent' }}
|
||||
- name: test misc
|
||||
run: npx vitest --project misc ${{ runner.debug == '1' && '' || '--silent' }}
|
||||
@ -39,13 +47,12 @@ jobs:
|
||||
run-abilities-tests:
|
||||
name: Run abilities tests
|
||||
runs-on: ubuntu-latest
|
||||
needs: checkout
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
- name: Install Node.js dependencies
|
||||
run: npm ci
|
||||
- name: pre-test
|
||||
@ -56,13 +63,12 @@ jobs:
|
||||
run-items-tests:
|
||||
name: Run items tests
|
||||
runs-on: ubuntu-latest
|
||||
needs: checkout
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
- name: Install Node.js dependencies
|
||||
run: npm ci
|
||||
- name: pre-test
|
||||
@ -73,13 +79,12 @@ jobs:
|
||||
run-moves-tests:
|
||||
name: Run moves tests
|
||||
runs-on: ubuntu-latest
|
||||
needs: checkout
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
- name: Install Node.js dependencies
|
||||
run: npm ci
|
||||
- name: pre-test
|
||||
@ -90,13 +95,12 @@ jobs:
|
||||
run-battle-tests:
|
||||
name: Run battle tests
|
||||
runs-on: ubuntu-latest
|
||||
needs: checkout
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
- name: Install Node.js dependencies
|
||||
run: npm ci
|
||||
- name: pre-test
|
||||
|
Loading…
Reference in New Issue
Block a user