Skip to content

Commit

Permalink
Merge branch 'main' into feature/#149-add-support-for-import-linter-t…
Browse files Browse the repository at this point in the history
…o-lint-tasks
  • Loading branch information
Jannis-Mittenzwei committed Sep 24, 2024
2 parents 524b546 + fc35075 commit ab90ffd
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 19 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }})
Expand Down Expand Up @@ -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
8 changes: 4 additions & 4 deletions .github/workflows/report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions doc/changes/unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

## 🐞 Bug Fixes

* #181 Updated metrics related workflows
* Fixed coverage for empty project

## ⚒️ Refactorings
Expand Down
20 changes: 13 additions & 7 deletions exasol/toolbox/templates/github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Checks

on: workflow_call
on:
workflow_call:
secrets:
ALTERNATIVE_GITHUB_TOKEN:
required: false

jobs:

Expand Down Expand Up @@ -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 }})
Expand All @@ -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:
Expand All @@ -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

6 changes: 3 additions & 3 deletions exasol/toolbox/templates/github/workflows/report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ jobs:
uses: exasol/python-toolbox/.github/actions/[email protected]

- 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
Expand Down

0 comments on commit ab90ffd

Please sign in to comment.