From d8611a50223d5ab84d21d07960e30ba186d7c88a Mon Sep 17 00:00:00 2001 From: Ralf Weber Date: Wed, 17 Jul 2024 22:28:53 +0100 Subject: [PATCH] Update pr.yaml --- .github/workflows/pr.yaml | 103 ++++++++++++++++++++------------------ 1 file changed, 55 insertions(+), 48 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index a52652f..3aab965 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -288,63 +288,70 @@ jobs: # to `|| true`) and create a global test report as json and html which # is provided as artifact # - check if any tool test actually failed (by lookup in the combined json) -# # and fail this step if this is the case -# SEEMS TO BE FAILING ON CONDA - UNABLE TO FIX -# combine_outputs: -# name: Combine chunked test results -# needs: [setup, test] -# if: ${{ needs.setup.outputs.repository-list != '' }} -# runs-on: ubuntu-latest -# strategy: -# matrix: -# python-version: ['3.11'] -# steps: -# - uses: actions/download-artifact@v2 -# with: -# path: artifacts -# - uses: actions/setup-python@v1 -# with: -# python-version: ${{ matrix.python-version }} -# - name: Cache .cache/pip -# uses: actions/cache@v2 -# id: cache-pip -# with: -# path: ~/.cache/pip -# key: pip_cache_py_${{ matrix.python-version }}_gxy_${{ needs.setup.outputs.galaxy-head-sha }} -# - name: Combine outputs -# uses: galaxyproject/planemo-ci-action@v1 -# id: combine -# with: -# mode: combine -# html-report: true -# - uses: actions/upload-artifact@v2 -# with: -# name: 'All tool test results' -# path: upload -# - name: Check outputs -# uses: galaxyproject/planemo-ci-action@v1 -# id: check -# with: -# mode: check + # and fail this step if this is the case + combine_outputs: + name: Combine chunked test results + needs: [setup, test] + if: ${{ always() && needs.setup.outputs.repository-list != '' }} + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.11'] + steps: + - uses: actions/download-artifact@v4 + with: + path: artifacts + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Cache .cache/pip + uses: actions/cache@v4 + id: cache-pip + with: + path: ~/.cache/pip + key: pip_cache_py_${{ matrix.python-version }}_gxy_${{ needs.setup.outputs.galaxy-head-sha }} + - name: Combine outputs + uses: galaxyproject/planemo-ci-action@v1 + id: combine + with: + mode: combine + html-report: true + markdown-report: true + - uses: actions/upload-artifact@v4 + with: + name: 'All tool test results' + path: upload + - run: cat upload/tool_test_output.md >> $GITHUB_STEP_SUMMARY + - name: Check outputs + uses: galaxyproject/planemo-ci-action@v1 + id: check + with: + mode: check + - name: Check if all test chunks succeeded + run: | + NFILES=$(ls artifacts/ | grep "Tool test output" | wc -l) + if [[ "${{ needs.setup.outputs.chunk-count }}" != "$NFILES" ]]; then + exit 1 + fi # deploy the tools to the toolsheds (first TTS for testing) deploy: name: Deploy - needs: [setup, lint, flake8, lintr] - if: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/main' ) && github.repository_owner == 'computational-metabolomics' }} + needs: [setup, lint, combine_outputs] + if: ${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' ) && github.repository_owner == 'computational-metabolomics' }} runs-on: ubuntu-latest strategy: matrix: python-version: ['3.11'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 1 - - uses: actions/setup-python@v1 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Cache .cache/pip - uses: actions/cache@v2 + uses: actions/cache@v4 id: cache-pip with: path: ~/.cache/pip @@ -367,8 +374,8 @@ jobs: determine-success: name: Check workflow success - needs: [setup, lint, flake8, lintr, file_sizes] - if: ${{ always() && github.ref != 'refs/heads/main' && github.ref != 'refs/heads/main' }} + needs: [setup, lint, flake8, lintr, file_sizes, combine_outputs] + if: ${{ always() && github.ref != 'refs/heads/master' && github.ref != 'refs/heads/main' }} runs-on: ubuntu-latest steps: - name: Check tool lint status @@ -383,6 +390,6 @@ jobs: - name: Indicate file size check status if: ${{ needs.file_sizes.result != 'success' && needs.file_sizes.result != 'skipped' }} run: exit 1 -# - name: Check tool test status -# if: ${{ needs.combine_outputs.result != 'success' && needs.combine_outputs.result != 'skipped' }} -# run: exit 1 + - name: Check tool test status + if: ${{ needs.combine_outputs.result != 'success' && needs.combine_outputs.result != 'skipped' }} + run: exit 1