Skip to content

Updated GitHub workflows #19

Updated GitHub workflows

Updated GitHub workflows #19

Workflow file for this run

name: Checks
on:
workflow_call:
secrets:
ALTERNATIVE_GITHUB_TOKEN:
required: false
jobs:
Version-Check:
name: Version
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/[email protected]
- name: Check Version(s)
run: poetry run version-check `poetry run python -c "from noxconfig import PROJECT_CONFIG; print(PROJECT_CONFIG.version_file)"`
echo "Please enable the version check by replacing this output with shell command bellow:"
echo ""
echo "poetry run version-check <<VERSION_PY>>"
echo ""
echo "Note: <<VERSION_PY>> needs to point to the version file of the project (version.py)."

Check failure on line 30 in .github/workflows/checks.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/checks.yml

Invalid workflow file

You have an error in your yaml syntax on line 30
exit 1
Documentation:
name: Docs
needs: [ Version-Check ]
runs-on: ubuntu-latest
steps:
- name: SCM Checkout
uses: actions/checkout@v4
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
- name: Build Documentation
run: |
poetry run python -m nox -s docs:build
Lint:
name: Linting (Python-${{ matrix.python-version }})
needs: [ Version-Check ]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
steps:
- name: SCM Checkout
uses: actions/checkout@v4
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Run lint
run: poetry run nox -s lint:code
- name: Upload Artifacts
uses: actions/[email protected]
with:
name: lint-python${{ matrix.python-version }}
path: .lint.txt
include-hidden-files: true
Type-Check:
name: Type Checking (Python-${{ matrix.python-version }})
needs: [ Version-Check ]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
steps:
- name: SCM Checkout
uses: actions/checkout@v4
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Run type-check
run: poetry run nox -s lint:typing
Security:
name: Security Checks (Python-${{ matrix.python-version }})
needs: [ Version-Check ]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
steps:
- name: SCM Checkout
uses: actions/checkout@v4
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Run security linter
run: poetry run nox -s lint:security
- name: Upload Artifacts
uses: actions/[email protected]
with:
name: security-python${{ matrix.python-version }}
path: .security.json
include-hidden-files: true
Tests:
name: Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}})
needs: [ Documentation, Lint, Type-Check, Security ]
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.ALTERNATIVE_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
strategy:
fail-fast: false
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
exasol-version: ["7.1.9"]
steps:
- name: SCM Checkout
uses: actions/checkout@v4
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Run Tests and Compute Coverage
run: poetry run nox -s test:coverage -- -- --db-version ${{ matrix.exasol-version }}
- name: Upload Artifacts
uses: actions/[email protected]
with:
name: coverage-python${{ matrix.python-version }}
path: .coverage
include-hidden-files: true