From 6153a6c2e2eab07434e6ee1b36d9a401363f1390 Mon Sep 17 00:00:00 2001 From: German <28149841+germa89@users.noreply.github.com> Date: Fri, 28 Jun 2024 18:11:22 +0200 Subject: [PATCH] Fix: wrong tagging on the coverage artifacts (#3225) chore: renaming the coverage artifacts to match Ubuntu based --- .github/workflows/ci.yml | 38 +++++++++++++++++++++++++++++------ doc/changelog.d/3225.fixed.md | 1 + 2 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 doc/changelog.d/3225.fixed.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 555da1bac8..3ff5136b92 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -410,6 +410,30 @@ jobs: echo "Distributed mode: $distributed_mode" echo "distributed_mode=$(echo $distributed_mode)" >> $GITHUB_OUTPUT + - name: "Get if running on Ubuntu" + id: ubuntu_check + run: | + if [[ "${{ matrix.mapdl-version }}" == *"ubuntu"* ]]; + then export ON_UBUNTU=true; export TAG_UBUNTU="ubuntu"; + else export ON_UBUNTU=false; export TAG_UBUNTU="centos"; + fi + echo "ON_UBUNTU: $ON_UBUNTU" + echo "TAG_UBUNTU: $TAG_UBUNTU" + echo "ON_UBUNTU=$(echo $ON_UBUNTU)" >> $GITHUB_OUTPUT + echo "TAG_UBUNTU=$(echo $TAG_UBUNTU)" >> $GITHUB_OUTPUT + + - name: "Get if running student version" + id: student_check + run: | + if [[ "${{ matrix.mapdl-version }}" == *"student"* ]]; + then export ON_STUDENT=true; export TAG_STUDENT="student"; + else export ON_STUDENT=false; export TAG_STUDENT="non-student"; + fi + echo "ON_STUDENT: $ON_STUDENT" + echo "TAG_STUDENT: $TAG_STUDENT" + echo "ON_STUDENT=$(echo $ON_STUDENT)" >> $GITHUB_OUTPUT + echo "TAG_STUDENT=$(echo $TAG_STUDENT)" >> $GITHUB_OUTPUT + - name: "Pull, launch, and validate MAPDL service" id: start_mapdl env: @@ -483,26 +507,28 @@ jobs: - name: "Unit testing" env: DISTRIBUTED_MODE: ${{ steps.distributed_mode.outputs.distributed_mode }} + ON_UBUNTU: ${{ steps.ubuntu_check.outputs.ON_UBUNTU }} + ON_STUDENT: ${{ steps.ubuntu_check.outputs.ON_STUDENT }} run: | - if [[ "${{ matrix.mapdl-version }}" == *"ubuntu"* ]]; then export ON_UBUNTU=true; else export ON_UBUNTU=false; fi echo "ON_UBUNTU: $ON_UBUNTU" + echo "ON_STUDENT: $ON_STUDENT" xvfb-run pytest \ ${{ env.PYTEST_ARGUMENTS }} \ --ignore_image_cache \ - --cov-report=xml:centos-${{ matrix.mapdl-version }}-remote.xml + --cov-report=xml:${{ matrix.mapdl-version }}-remote.xml - uses: codecov/codecov-action@v4 name: "Upload coverage to Codecov" with: token: ${{ secrets.CODECOV_TOKEN }} # required - name: centos-${{ matrix.mapdl-version }}-remote.xml - flags: centos,remote,${{ matrix.mapdl-version }} + name: ${{ matrix.mapdl-version }}-remote.xml + flags: remote,${{ steps.ubuntu_check.outputs.TAG_UBUNTU }},${{ matrix.mapdl-version }},${{ steps.distributed_mode.outputs.distributed_mode }},${{ steps.ubuntu_check.outputs.TAG_STUDENT }} - name: Upload coverage artifacts uses: actions/upload-artifact@v4 with: - name: centos-${{ matrix.mapdl-version }}-remote.xml - path: ./centos-${{ matrix.mapdl-version }}-remote.xml + name: ${{ matrix.mapdl-version }}-remote.xml + path: ./${{ matrix.mapdl-version }}-remote.xml - name: "Check package" run: | diff --git a/doc/changelog.d/3225.fixed.md b/doc/changelog.d/3225.fixed.md new file mode 100644 index 0000000000..8184740967 --- /dev/null +++ b/doc/changelog.d/3225.fixed.md @@ -0,0 +1 @@ +ci: wrong tagging on the coverage artifacts \ No newline at end of file