From df8cdceca578739773f44ee5dfe5003477c61996 Mon Sep 17 00:00:00 2001 From: Mike Alfare Date: Sat, 9 Mar 2024 16:56:39 -0500 Subject: [PATCH] update test archive publishing --- .../action.yml | 21 ++++++++----------- .github/workflows/unit-tests.yml | 7 +++---- 2 files changed, 12 insertions(+), 16 deletions(-) rename .github/actions/{publish-test-results => publish-test-logs}/action.yml (64%) diff --git a/.github/actions/publish-test-results/action.yml b/.github/actions/publish-test-logs/action.yml similarity index 64% rename from .github/actions/publish-test-results/action.yml rename to .github/actions/publish-test-logs/action.yml index 3b465293..7b0916d8 100644 --- a/.github/actions/publish-test-results/action.yml +++ b/.github/actions/publish-test-logs/action.yml @@ -1,5 +1,5 @@ -name: "Publish test results" -description: "Upload test artifacts to a unique archive name" +name: "Publish test logs" +description: "Upload test logs to a unique archive name" inputs: archive-type: @@ -11,9 +11,6 @@ inputs: os: description: "OS for the archive name stub (e.g. ubuntu-latest)" required: true - source-file: - description: "File/directory to be uploaded" - required: true outputs: archive-name: @@ -23,7 +20,7 @@ outputs: runs: using: composite steps: - - name: "Create unique test archive name" + - name: "Create unique archive name" id: archive shell: bash run: | @@ -31,15 +28,15 @@ runs: archive_name="${{ inputs.archive-type }}_python-${{ inputs.python-version }}_${{ inputs.os }}_$timestamp" echo "archive-name=$archive_name" >> $GITHUB_OUTPUT - - name: "Upload test results" - uses: actions/upload-artifact@v3 + - name: "Upload test logs" + uses: actions/upload-artifact@v4 with: name: ${{ steps.archive.outputs.archive-name }} - path: ./${{ inputs.source-file }} + path: ./logs - - name: "[INFO] Uploaded test artifacts" + - name: "[INFO] Uploaded test logs" shell: bash run: | - title="Uploaded test artifacts" - message="Uploaded ${{ inputs.source-file }} to ${{ steps.archive.outputs.archive-name }}" + title="Uploaded test logs" + message="Uploaded `./logs` to ${{ steps.archive.outputs.archive-name }}" echo "::notice title=${{ env.NOTIFICATION_PREFIX }}: $title::$message" diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 27f950f2..6520a894 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -59,11 +59,10 @@ jobs: run: hatch run unit-tests:all shell: bash - - name: "Publish results" - uses: ./.github/actions/publish-test-results + - name: "Publish test logs" + uses: ./.github/actions/publish-test-logs if: ${{ contains(github.event_name, 'workflow_') }} with: - archive-type: "unit_results" + archive-type: "unit-test" python-version: ${{ matrix.python-version }} os: ${{ matrix.os }} - source-file: "results.csv"