forked from exasol/bucketfs-utils-python
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dependencies 2024-05-16 and Python-Toolbox (#134)
- Loading branch information
Showing
13 changed files
with
570 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Build & Publish | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
PYPI_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
|
||
cd-job: | ||
name: Continues Delivery | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: SCM Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python & Poetry Environment | ||
uses: exasol/python-toolbox/.github/actions/python-environment@0.12.0 | ||
|
||
- name: Build Artifacts | ||
run: poetry build | ||
|
||
- name: PyPi Release | ||
env: | ||
POETRY_HTTP_BASIC_PYPI_USERNAME: "__token__" | ||
POETRY_HTTP_BASIC_PYPI_PASSWORD: "${{ secrets.PYPI_TOKEN }}" | ||
run: poetry publish | ||
|
||
- name: GitHub Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: > | ||
gh release create ${GITHUB_REF_NAME} | ||
--title ${GITHUB_REF_NAME} | ||
--notes-file ./doc/changes/changes_${GITHUB_REF_NAME}.md | ||
dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Check Release Tag | ||
|
||
on: workflow_call | ||
|
||
jobs: | ||
|
||
check-tag-version-job: | ||
|
||
name: Check Tag Version | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: SCM Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python & Poetry Environment | ||
uses: exasol/python-toolbox/.github/actions/python-environment@0.12.0 | ||
|
||
- name: Check Tag Version | ||
# make sure the pushed/created tag matched the project version | ||
run: "[[ `poetry version --short` == ${{ github.ref_name }} ]]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
name: Checks | ||
|
||
on: workflow_call | ||
|
||
jobs: | ||
|
||
version-check-job: | ||
name: Version Check | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: SCM Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Python & Poetry Environment | ||
uses: exasol/python-toolbox/.github/actions/python-environment@0.12.0 | ||
|
||
- name: Check Version(s) | ||
run: poetry run version-check exasol/bucketfs/version.py | ||
|
||
build-documentation-job: | ||
name: Build Documentation | ||
needs: [version-check-job] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: SCM Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python & Poetry Environment | ||
uses: exasol/python-toolbox/.github/actions/python-environment@0.12.0 | ||
|
||
- name: Build Documentation | ||
run: | | ||
poetry run python -m nox -s build-docs | ||
lint-job: | ||
name: Linting (Python-${{ matrix.python-version }}) | ||
needs: [version-check-job] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
|
||
steps: | ||
- name: SCM Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python & Poetry Environment | ||
uses: exasol/python-toolbox/.github/actions/python-environment@0.12.0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Run Tests | ||
run: poetry run nox -s lint | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: .lint.txt | ||
path: .lint.txt | ||
|
||
type-check-job: | ||
name: Type Checking (Python-${{ matrix.python-version }}) | ||
needs: [version-check-job] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
|
||
steps: | ||
- name: SCM Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python & Poetry Environment | ||
uses: exasol/python-toolbox/.github/actions/python-environment@0.12.0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Run Tests | ||
run: poetry run nox -s type-check | ||
|
||
tests-job: | ||
name: Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}}) | ||
needs: [build-documentation-job, lint-job, type-check-job] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
exasol-version: ["7.1.9"] | ||
|
||
steps: | ||
- name: SCM Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python & Poetry Environment | ||
uses: exasol/python-toolbox/.github/actions/python-environment@0.12.0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Run Tests | ||
run: poetry run nox -s coverage -- -- --db-version ${{ matrix.exasol-version }} | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: .coverage | ||
path: .coverage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Publish Documentation | ||
|
||
on: workflow_call | ||
|
||
jobs: | ||
|
||
documentation-job: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: SCM Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python & Poetry Environment | ||
uses: exasol/python-toolbox/.github/actions/python-environment@0.12.0 | ||
|
||
- name: Build Documentation | ||
run: | | ||
poetry run python -m nox -s build-docs | ||
- name: Deploy | ||
uses: JamesIves/github-pages-deploy-action@v4.6.0 | ||
with: | ||
branch: gh-pages | ||
folder: .html-documentation | ||
git-config-name: Github Action | ||
git-config-email: opensource@exasol.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Status Report | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
ALTERNATIVE_GITHUB_TOKEN: | ||
required: false | ||
|
||
jobs: | ||
|
||
report: | ||
name: Generate Status Report | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.ALTERNATIVE_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
- name: SCM Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Python & Poetry Environment | ||
uses: exasol/python-toolbox/.github/actions/python-environment@0.12.0 | ||
|
||
- name: Download Artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
path: ./artifacts | ||
|
||
- name: Copy Artifacts into Root Folder | ||
working-directory: ./artifacts | ||
run: | | ||
cp .coverage/.coverage ../ | ||
cp .lint.txt/.lint.txt ../ | ||
- name: Generate Report | ||
run: poetry run nox -s report -- -- --format json | tee metrics.json | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: metrics.json | ||
path: metrics.json | ||
|
||
- name: Generate GitHub Summary | ||
run: | | ||
echo -e "# Summary\n" >> $GITHUB_STEP_SUMMARY | ||
poetry run nox -s report -- -- --format markdown >> $GITHUB_STEP_SUMMARY | ||
echo -e "\n\n# Coverage\n" >> $GITHUB_STEP_SUMMARY | ||
poetry run coverage report -- --format markdown >> $GITHUB_STEP_SUMMARY | ||
echo -e "\n\n# Static Code Analysis\n" >> $GITHUB_STEP_SUMMARY | ||
cat .lint.txt >> $GITHUB_STEP_SUMMARY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
# Unreleased | ||
# Unreleased | ||
|
||
## Internal | ||
- Updated lockfile | ||
- Update workflows to align with used exasol-toolbox version (0.12.0) |
Oops, something went wrong.