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 }}