Skip to content

Update upload artifacts action #245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 workflow's
* 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