diff --git a/.github/workflows/run-test-template.yml b/.github/workflows/run-test-template.yml index c8779f020fc..8c80aa83648 100644 --- a/.github/workflows/run-test-template.yml +++ b/.github/workflows/run-test-template.yml @@ -6,6 +6,9 @@ on: project: required: true type: string + options: + required: false + type: string jobs: test: @@ -20,4 +23,4 @@ jobs: - name: Install Node.js dependencies run: npm ci - name: Run ${{ inputs.project }} tests - run: npx vitest --project ${{ inputs.project }} ${{ runner.debug == 1 && '' || '--silent' }} + run: npx vitest --project ${{ inputs.project }} ${{ inputs.options }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1d2cd2567f1..8813865a68b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,5 +1,8 @@ name: Tests +env: + VITEST_OPTIONS: ${{ !runner.debug && '--silent' }} + on: # Trigger the workflow on push or pull request, # but only for the main branch @@ -32,7 +35,7 @@ jobs: run: npm ci - name: Run Pre-test working-directory: tests-action - run: npx vitest run --project pre ${{ runner.debug == 1 && '' || '--silent' }} + run: npx vitest run --project pre $VITEST_OPTIONS run-tests: name: Run Tests @@ -42,4 +45,5 @@ jobs: project: [misc, abilities, items, moves, battle] uses: ./.github/workflows/run-test-template.yml with: - project: ${{ matrix.project }} \ No newline at end of file + project: ${{ matrix.project }} + options: $VITEST_OPTIONS \ No newline at end of file