Skip to content

Move version bump logic into publish task #27

Move version bump logic into publish task

Move version bump logic into publish task #27

Workflow file for this run

name: "On Commit"
on:
push: { branches: [ "develop" ], tags: [ "*" ] }
pull_request: { branches: [ "*" ] }
env:
COLUMNS: 200
jobs:
# == Validate data embedded in the Kraken standard library ==
gitignore-io-up-to-date:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: NiklasRosenstein/slap@gha/install/v1
- uses: actions/setup-python@v5
with: { python-version: "3.10" }
- run: slap install --link --no-venv-check ${{ matrix.only }}
- run: python -m kraken.std.git.gitignore.gitignore_io
- run: git diff --exit-code
# == Documentation ==
documentation:
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: NiklasRosenstein/slap@gha/install/v1
- run: pipx install kraken-wrapper==0.34.1 && krakenw config --installer=UV
- run: pipx install mksync
- name: Restore Kraken build cache
uses: actions/cache/restore@v4
with:
path: build
key: build-cache:${{ runner.os }}:${{ hashFiles('.kraken.lock') }}
- run: |
cd docs
for fn in docs/cli/*.md; do mksync -i $fn; done
mksync -i docs/changelog.md
- run: krakenw run mkdocs.build --no-save
- name: Save Kraken build cache
uses: actions/cache/save@v4
with:
path: build
key: build-cache:${{ runner.os }}:${{ hashFiles('.kraken.lock') }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: build/docs/mkdocs/_site
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/develop'
id: deployment
uses: actions/deploy-pages@v4
# == Unit tests, linting, and type checking ==
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.x"]
steps:
- uses: actions/checkout@v4
- uses: NiklasRosenstein/slap@gha/install/v1
- uses: actions/setup-python@v5
with: { python-version: "${{ matrix.python-version }}" }
- run: pip install pipx && pipx install poetry && pipx install pdm && pipx install kraken-wrapper==0.34.1 && krakenw config --installer=UV
- run: rustup update
- name: Restore Kraken build cache
uses: actions/cache/restore@v4
with:
path: build
key: build-cache:${{ runner.os }}:${{ hashFiles('.kraken.lock') }}
- name: Restore Venv
uses: actions/cache/restore@v4
with:
path: .venvs/
key: build-cache:${{ runner.os }}:venv:${{ matrix.python-version }}
# Explicitly mention python.install to ensure that Pip install is rerun.
- run: krakenw run python.install check lint test -vv
- name: Save Venv
uses: actions/cache/save@v4
with:
path: .venvs/
key: build-cache:${{ runner.os }}:venv:${{ matrix.python-version }}
- name: Save Kraken build cache
uses: actions/cache/save@v4
with:
path: build
key: build-cache:${{ runner.os }}:${{ hashFiles('.kraken.lock') }}
# == Try running Kraken as defined in the kraken.yaml file ==
selftest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- python-version: "3.10"
- python-version: "3.11"
- python-version: "3.12"
- python-version: "3.x"
steps:
- uses: actions/checkout@v4
- uses: NiklasRosenstein/slap@gha/install/v1
- uses: actions/setup-python@v5
with: { python-version: "${{ matrix.python-version }}" }
- run: pip install pipx && pipx install poetry && pipx install pdm
- run: rustup update
- name: Restore cache
uses: actions/cache/restore@v4
with:
path: |
build
.venvs
key: build-cache:${{ runner.os }}:selftest
- run: slap install --link --no-venv-check ${{ matrix.only }}
- run: kraken run python.install fmt lint test -vv
- run: kraken q ls
- run: kraken q tree
- run: kraken q viz
- run: kraken q d python.mypy
- name: Save cache
uses: actions/cache/save@v4
with:
path: |
build
.venvs
key: build-cache:${{ runner.os }}:selftest
uv-installer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: NiklasRosenstein/slap@gha/install/v1
- run: slap install --link --no-venv-check
- run: krakenw --reinstall --use=UV
- run: krakenw run fmt lint
examples-docker-manual:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- python-version: "3.10"
- python-version: "3.11"
- python-version: "3.12"
- python-version: "3.x"
steps:
- uses: actions/checkout@v4
- uses: NiklasRosenstein/slap@gha/install/v1
- uses: actions/setup-python@v5
with: { python-version: "${{ matrix.python-version }}" }
- run: slap install --link --no-venv-check ${{ matrix.only }}
- run: cd examples/docker-manual && kraken run :dockerBuild :sub:helloWorld