Skip to content

build: trial official nox action #1251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 36 additions & 14 deletions .github/workflows/pythonapp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,38 @@ permissions:
checks: write

jobs:
build_backend:
generate-jobs:
runs-on: ubuntu-latest
outputs:
session: ${{ steps.set-matrix.outputs.session }}
steps:
- uses: actions/checkout@v3
- uses: wntrblm/nox@main
- run: |
/home/runner/work/_temp/nox-venv/bin/python3 -m ensurepip
/home/runner/work/_temp/nox-venv/bin/python3 -m pip install github_action_utils
- run: nox --json -l
- id: set-matrix
shell: bash
run: echo session=$(nox --json -l | jq -c '[.[].session]') | tee --append $GITHUB_OUTPUT
checks:
name: Session ${{ matrix.session }}
needs: [generate-jobs]
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python: [3.9, "3.10"]

env:
FORCE_COLOR: 1

session: ${{ fromJson(needs.generate-jobs.outputs.session) }}
steps:
- uses: actions/checkout@v4
- name: Remove cached duckdb extensions
run: rm -rf ~/.duckdb
- uses: fjwillemsen/[email protected]
- run: python -m pip install github-action-utils uv -U
- name: List nox envs
run: nox -l
- run: nox --pythons '${{ matrix.python }}'
- run: uvx poetry build
- run: uvx poetry check --strict
- uses: actions/checkout@v3
- uses: wntrblm/nox@main
- run: |
/home/runner/work/_temp/nox-venv/bin/python3 -m ensurepip
/home/runner/work/_temp/nox-venv/bin/python3 -m pip install github_action_utils uv -U
- run: nox -s "${{ matrix.session }}"
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
Expand All @@ -44,3 +54,15 @@ jobs:
env_vars: PYTHON # ,BLEEDING_EDGE # set from matrix
fail_ci_if_error: true
verbose: true

build_backend:
runs-on: ubuntu-latest

env:
FORCE_COLOR: 1

steps:
- uses: actions/checkout@v4
- run: python -m pip install uv -U
- run: uvx poetry build
- run: uvx poetry check --strict
8 changes: 8 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# /// script
# dependencies = ["nox", "github_action_utils", "uv"]
# ///

from contextlib import contextmanager
from typing import Generator

Expand Down Expand Up @@ -70,3 +74,7 @@ def poetry(session: nox.Session) -> None:
def mypy(session: nox.Session) -> None:
poetry(session)
session.run("mypy", "duckdb_engine/")


if __name__ == "__main__":
nox.main()