From 61b6c203cbfdb478336a708fe4d079c6a5b2553c Mon Sep 17 00:00:00 2001 From: Nicola Coretti Date: Tue, 24 Sep 2024 08:19:52 +0200 Subject: [PATCH 1/7] Update upload artifacts action --- .github/workflows/checks.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 6f4a71ee6..32bd81b83 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -62,11 +62,11 @@ jobs: run: poetry run nox -s lint - name: Upload Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4.4.0 with: - name: .lint.txt + name: lint-python${{ matrix.python-version }}.txt path: .lint.txt - overwrite: true + include-hidden-files: true type-check-job: name: Type Checking (Python-${{ matrix.python-version }}) @@ -114,7 +114,8 @@ jobs: run: poetry run nox -s coverage -- -- --db-version ${{ matrix.exasol-version }} - name: Upload Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4.4.0 with: - name: .coverage + name: coverage-python${{ matrix.python-version }} path: .coverage + include-hidden-files: true From c3259c1ae9c495cdfaa2df27f2c1b39e7fb9cbf2 Mon Sep 17 00:00:00 2001 From: Nicola Coretti Date: Tue, 24 Sep 2024 08:28:26 +0200 Subject: [PATCH 2/7] Update report workflow to use new download artifact action --- .github/workflows/report.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/report.yml b/.github/workflows/report.yml index 790bf5cd7..8fc166dbc 100644 --- a/.github/workflows/report.yml +++ b/.github/workflows/report.yml @@ -24,21 +24,21 @@ jobs: uses: ./.github/actions/python-environment - name: Download Artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.8 with: path: ./artifacts - name: Copy Artifacts into Root Folder working-directory: ./artifacts run: | - cp .coverage/.coverage ../ - cp .lint.txt/.lint.txt ../ + cp coverage-python3.9 ../.coverage + cp lint-python3.9.txt ../.lint.txt - name: Generate Report run: poetry run nox -s report -- -- --format json | tee metrics.json - name: Upload Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4.4.0 with: name: metrics.json path: metrics.json From e3a588ae04abbf98ae61d73b3ed1570db6a85c1b Mon Sep 17 00:00:00 2001 From: Nicola Coretti Date: Tue, 24 Sep 2024 09:15:03 +0200 Subject: [PATCH 3/7] Debug report workflow --- .github/workflows/report.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/report.yml b/.github/workflows/report.yml index 8fc166dbc..dbbc91b9f 100644 --- a/.github/workflows/report.yml +++ b/.github/workflows/report.yml @@ -31,6 +31,7 @@ jobs: - name: Copy Artifacts into Root Folder working-directory: ./artifacts run: | + ls -R -a cp coverage-python3.9 ../.coverage cp lint-python3.9.txt ../.lint.txt From 7e8650b409cf0d77b9f7301d3bc2681ab7a48e2e Mon Sep 17 00:00:00 2001 From: Nicola Coretti Date: Tue, 24 Sep 2024 09:30:43 +0200 Subject: [PATCH 4/7] Fixes --- .github/workflows/checks.yml | 2 +- .github/workflows/report.yml | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 32bd81b83..7e1bbd095 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -64,7 +64,7 @@ jobs: - name: Upload Artifacts uses: actions/upload-artifact@v4.4.0 with: - name: lint-python${{ matrix.python-version }}.txt + name: lint-python${{ matrix.python-version }} path: .lint.txt include-hidden-files: true diff --git a/.github/workflows/report.yml b/.github/workflows/report.yml index dbbc91b9f..451ffc3ef 100644 --- a/.github/workflows/report.yml +++ b/.github/workflows/report.yml @@ -31,9 +31,8 @@ jobs: - name: Copy Artifacts into Root Folder working-directory: ./artifacts run: | - ls -R -a - cp coverage-python3.9 ../.coverage - cp lint-python3.9.txt ../.lint.txt + cp coverage-python3.9/.coverage ../ + cp lint-python3.9/.lint.txt ../ - name: Generate Report run: poetry run nox -s report -- -- --format json | tee metrics.json From 8f774253f380cf295903aeb38df8de183bf9b15b Mon Sep 17 00:00:00 2001 From: Nicola Coretti Date: Tue, 24 Sep 2024 10:46:32 +0200 Subject: [PATCH 5/7] Update workflow templates --- .../templates/github/workflows/checks.yml | 20 ++++++++++++------- .../templates/github/workflows/report.yml | 6 +++--- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/exasol/toolbox/templates/github/workflows/checks.yml b/exasol/toolbox/templates/github/workflows/checks.yml index 59e31fd78..12618205a 100644 --- a/exasol/toolbox/templates/github/workflows/checks.yml +++ b/exasol/toolbox/templates/github/workflows/checks.yml @@ -1,6 +1,10 @@ name: Checks -on: workflow_call +on: + workflow_call: + secrets: + ALTERNATIVE_GITHUB_TOKEN: + required: false jobs: @@ -58,11 +62,11 @@ jobs: run: poetry run nox -s lint - name: Upload Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4.4.0 with: - name: .lint.txt + name: lint-python${{ matrix.python-version }} path: .lint.txt - overwrite: true + include-hidden-files: true type-check-job: name: Type Checking (Python-${{ matrix.python-version }}) @@ -89,6 +93,8 @@ jobs: name: Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}}) needs: [build-documentation-job, lint-job, type-check-job] runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.ALTERNATIVE_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} strategy: fail-fast: false matrix: @@ -108,9 +114,9 @@ jobs: run: poetry run nox -s coverage -- -- --db-version ${{ matrix.exasol-version }} - name: Upload Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4.4.0 with: - name: .coverage + name: coverage-python${{ matrix.python-version }} path: .coverage - overwrite: true + include-hidden-files: true diff --git a/exasol/toolbox/templates/github/workflows/report.yml b/exasol/toolbox/templates/github/workflows/report.yml index ef2956d23..789086295 100644 --- a/exasol/toolbox/templates/github/workflows/report.yml +++ b/exasol/toolbox/templates/github/workflows/report.yml @@ -24,15 +24,15 @@ jobs: uses: exasol/python-toolbox/.github/actions/python-environment@0.14.0 - name: Download Artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4.1.8 with: path: ./artifacts - name: Copy Artifacts into Root Folder working-directory: ./artifacts run: | - cp .coverage/.coverage ../ - cp .lint.txt/.lint.txt ../ + cp coverage-python3.9/.coverage ../ + cp lint-python3.9/.lint.txt ../ - name: Generate Report run: poetry run nox -s report -- -- --format json | tee metrics.json From df43e0880c9aeb8796bbe869f7875793602dc4b3 Mon Sep 17 00:00:00 2001 From: Nicola Coretti Date: Tue, 24 Sep 2024 10:57:30 +0200 Subject: [PATCH 6/7] Update release notes --- doc/changes/unreleased.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/changes/unreleased.md b/doc/changes/unreleased.md index 9ead303d1..8336c5342 100644 --- a/doc/changes/unreleased.md +++ b/doc/changes/unreleased.md @@ -11,6 +11,7 @@ ## 🐞 Bug Fixes +* #181 Updated metrics related workflow's * Fixed coverage for empty project ## ⚒️ Refactorings From 5aad109cac3779e37a9fbf9023714b81720383fa Mon Sep 17 00:00:00 2001 From: Nicola Coretti Date: Tue, 24 Sep 2024 11:00:28 +0200 Subject: [PATCH 7/7] Update doc/changes/unreleased.md Co-authored-by: Christoph Pirkl <4711730+kaklakariada@users.noreply.github.com> --- doc/changes/unreleased.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changes/unreleased.md b/doc/changes/unreleased.md index 8336c5342..42c338f35 100644 --- a/doc/changes/unreleased.md +++ b/doc/changes/unreleased.md @@ -11,7 +11,7 @@ ## 🐞 Bug Fixes -* #181 Updated metrics related workflow's +* #181 Updated metrics related workflows * Fixed coverage for empty project ## ⚒️ Refactorings