From bca586f32db7e8722de3743b888eff9ff42b732f Mon Sep 17 00:00:00 2001 From: Scion Date: Thu, 1 Jan 2026 16:46:57 -0800 Subject: [PATCH] Updated test command. --- npm/npm-test/action.yaml | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/npm/npm-test/action.yaml b/npm/npm-test/action.yaml index 1b9e92d..6d05b58 100644 --- a/npm/npm-test/action.yaml +++ b/npm/npm-test/action.yaml @@ -13,26 +13,18 @@ inputs: description: "Command to run tests. Default: npm test" required: false default: "npm test" - coverageCommand: - description: "Command to run tests with coverage. Default: npm run test:coverage" - required: false - default: "npm run test:coverage" - runCoverage: - description: "Whether to run coverage. Values: true, false." + uploadCoverage: + description: "Whether to upload coverage artifacts. Values: true, false." required: false default: "false" coverageDirectory: description: "Directory for the coverage output. Default: coverage" required: false default: "coverage" - uploadArtifacts: - description: "Whether to upload test artifacts. Values: true, false." - required: false - default: "false" artifactName: - description: "Name of the artifact to upload. Default: test-results" + description: "Name of the coverage artifact to upload. Default: coverage" required: false - default: "test-results" + default: "coverage" retention-days: description: "Number of retention days for artifacts. Default: 7" required: false @@ -54,13 +46,8 @@ runs: run: ${{ inputs.testCommand }} working-directory: ${{ inputs.workingDirectory }} shell: bash - - name: "Run tests with coverage" - if: ${{ inputs.runCoverage == 'true' }} - run: ${{ inputs.coverageCommand }} - working-directory: ${{ inputs.workingDirectory }} - shell: bash - - name: "Upload test artifacts" - if: ${{ inputs.uploadArtifacts == 'true' && always() }} + - name: "Upload coverage artifacts" + if: ${{ inputs.uploadCoverage == 'true' && always() }} uses: https://github.com/ChristopherHX/gitea-upload-artifact@v4 with: name: ${{ inputs.artifactName }}