Fixed git workflow #1
Workflow file for this run
This file contains hidden or 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
name: Checks | ||
on: workflow_call | ||
jobs: | ||
version-check-job: | ||
name: Version Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: SCM Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Python & Poetry Environment | ||
uses: exasol/python-toolbox/.github/actions/python-environment@0.14.0 | ||
- name: Check Version(s) | ||
run: poetry run version-check version.py | ||
build-documentation-job: | ||
name: Build Documentation | ||
needs: [version-check-job] | ||
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.14.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.10", "3.11"] | ||
steps: | ||
- name: SCM Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Python & Poetry Environment | ||
uses: exasol/python-toolbox/.github/actions/python-environment@0.14.0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Run Linter | ||
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.10", "3.11"] | ||
steps: | ||
- name: SCM Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Python & Poetry Environment | ||
uses: exasol/python-toolbox/.github/actions/python-environment@0.14.0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Run Type check | ||
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.10", "3.11"] | ||
exasol-version: ["7.1.26"] | ||
steps: | ||
- name: SCM Checkout | ||
uses: actions/checkout@v4 | ||
- name: Free disk space | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
tool-cache: true | ||
large-packages: false | ||
- name: Free disk space by removing large directories | ||
run: | | ||
sudo rm -rf /usr/local/graalvm/ | ||
sudo rm -rf /usr/local/.ghcup/ | ||
sudo rm -rf /usr/local/share/powershell | ||
sudo rm -rf /usr/local/share/chromium | ||
sudo rm -rf /usr/local/lib/node_modules | ||
sudo rm -rf /opt/ghc | ||
- name: Setup Python & Poetry Environment | ||
uses: exasol/python-toolbox/.github/actions/python-environment@0.14.0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Calculate Test Coverage | ||
run: poetry run nox -s coverage -- -- --db-version ${{ matrix.exasol-version }} | ||
env: | ||
PYTEST_ADDOPTS: "-W 'ignore::DeprecationWarning:luigi:' | ||
-W 'ignore::DeprecationWarning:pkg_resources:' | ||
-W 'ignore:pkg_resources is deprecated as an API:DeprecationWarning' | ||
-W 'ignore:Deprecated call to \`pkg_resources.declare_namespace:DeprecationWarning' | ||
-W 'ignore::DeprecationWarning:exasol_integration_test_docker_environment:'" | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: .coverage | ||
path: .coverage |