From 47df2874308629d8e78698fd957b3c732fa71054 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Wed, 30 Aug 2023 15:33:18 +0200 Subject: [PATCH] try moving status check back where it belongs --- .github/workflows/glmakie.yaml | 40 +++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/glmakie.yaml b/.github/workflows/glmakie.yaml index 0523cbd9ecf..4acc538e217 100644 --- a/.github/workflows/glmakie.yaml +++ b/.github/workflows/glmakie.yaml @@ -37,26 +37,6 @@ jobs: arch: - x64 steps: - - name: Add reference images status - uses: actions/github-script@v6 - if: matrix.version == '1' - env: - n_missing_refimages: '2' - with: - debug: true - script: | - await github.request('POST /repos/{owner}/{repo}/statuses/{sha}', { - owner: context.repo.owner, - repo: context.repo.repo, - sha: "${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}", - state: process.env.n_missing_refimages === '0' ? 'success' : 'failure', - target_url: null, - description: process.env.n_missing_refimages + " missing refimages", - context: 'Reference Tests', - headers: { - 'X-GitHub-Api-Version': '2022-11-28' - } - }) - name: Checkout uses: actions/checkout@v3 - uses: julia-actions/setup-julia@v1 @@ -83,6 +63,26 @@ jobs: name: ReferenceImages_${{ matrix.os }}_${{ matrix.arch }}_${{ matrix.version }} path: | ./GLMakie/test/recorded_reference_images/ + - name: Add reference images status + uses: actions/github-script@v6 + if: matrix.version == '1' + env: + n_missing_refimages: ${{ steps.referencetests.outputs.n_missing_refimages }} + with: + debug: false + script: | + await github.request('POST /repos/{owner}/{repo}/statuses/{sha}', { + owner: context.repo.owner, + repo: context.repo.repo, + sha: "${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}", + state: process.env.n_missing_refimages === '0' ? 'success' : 'failure', + target_url: null, + description: process.env.n_missing_refimages + " missing refimages must be uploaded", + context: 'Reference Tests', + headers: { + 'X-GitHub-Api-Version': '2022-11-28' + } + }) - name: Fail after artifacts if tests failed if: ${{ env.TESTS_SUCCESSFUL != 'true' }} run: exit 1