Fix #263: Relative local dependencies in buildscript(requirements)
are now resolved relative to the project root
#402
Workflow file for this run
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
name: "On Commit" | |
on: | |
push: { branches: [ "develop" ], tags: [ "*" ] } | |
pull_request: { branches: [ "*" ] } | |
env: | |
COLUMNS: 200 | |
PYTEST_FLAGS: --numprocesses 4 | |
SLAP_VERBOSE: more | |
jobs: | |
# == Documentation == | |
documentation: | |
runs-on: arc-amd64-small | |
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: arc-amd64-small | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10", "3.11", "3.12", "3.x"] | |
tasks: ["check lint", "test"] | |
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 | |
- run: slap config --venv-type=uv | |
- 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 ${{ matrix.tasks }} -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: arc-amd64-small | |
# 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 | |
# - run: rustup update | |
# - name: Restore cache | |
# uses: actions/cache/restore@v4 | |
# with: | |
# path: | | |
# build | |
# .venvs | |
# key: build-cache:${{ runner.os }}:selftest | |
# # - run: slap config --venv-type=uv && slap install --link --no-venv-check ${{ matrix.only }} | |
# - 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 | |
# - run: krakenw run python.install fmt lint test -vv | |
# - name: Save cache | |
# uses: actions/cache/save@v4 | |
# with: | |
# path: | | |
# build | |
# .venvs | |
# key: build-cache:${{ runner.os }}:selftest | |
# uv-installer: | |
# runs-on: arc-amd64-small | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: NiklasRosenstein/slap@gha/install/v1 | |
# - run: slap config --venv-type=uv && slap install --link --no-venv-check | |
# - run: krakenw --reinstall --use=UV | |
# - run: krakenw run fmt lint | |
examples-docker-manual: | |
runs-on: arc-amd64-small | |
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: slap config --venv-type=uv && slap install --link --no-venv-check ${{ matrix.only }} | |
- run: cd examples/docker-manual && kraken run :dockerBuild :sub:helloWorld |