diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 6f4a71ee..7e1bbd09 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 }} 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 diff --git a/.github/workflows/report.yml b/.github/workflows/report.yml index 790bf5cd..451ffc3e 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/.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 diff --git a/doc/changes/unreleased.md b/doc/changes/unreleased.md index 9ead303d..42c338f3 100644 --- a/doc/changes/unreleased.md +++ b/doc/changes/unreleased.md @@ -11,6 +11,7 @@ ## 🐞 Bug Fixes +* #181 Updated metrics related workflows * Fixed coverage for empty project ## ⚒️ Refactorings diff --git a/exasol/toolbox/templates/github/workflows/checks.yml b/exasol/toolbox/templates/github/workflows/checks.yml index 59e31fd7..12618205 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 ef2956d2..78908629 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