Skip to content

Commit

Permalink
Use PTB to setup poetry and python
Browse files Browse the repository at this point in the history
  • Loading branch information
ckunki committed Sep 12, 2024
1 parent 3b9fbb4 commit 229af06
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 65 deletions.
21 changes: 0 additions & 21 deletions .github/actions/prepare_poetry_env/action.yml

This file was deleted.

61 changes: 29 additions & 32 deletions .github/workflows/check-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,32 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
python-version: ${{ matrix.python-version }}

# - name: Setup Python & Poetry Environment
# uses: ./.github/actions/prepare_poetry_env

- name: Install Lua environment
run: ./scripts/install_lua_environment.sh

- name: Poetry install
run: ./scripts/run_in_dev_env.sh poetry install

- name: Run packaging update
# re-generates / amalgate the lua script
# refactor pre-commit as nox task
# and call in pre-commit
run: bash ./githooks/pre-commit

- name: Show changes on working copy
# check if re-generated lua script is still up-to-date
run: git status --porcelain=v1 -uno

- name: Show diff on working copy
run: git diff --cached

- name: Check if packaging changed
run: |
[ -z "$(git status --porcelain=v1 -uno 2>/dev/null)" ]
- uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
python-version: ${{ matrix.python-version }}

- name: Install Lua environment
run: ./scripts/install_lua_environment.sh

- name: Poetry install
run: ./scripts/run_in_dev_env.sh poetry install

- name: Run packaging update
# re-generates / amalgate the lua script
# refactor pre-commit as nox task
# and call in pre-commit
run: bash ./githooks/pre-commit

- name: Show changes on working copy
# check if re-generated lua script is still up-to-date
run: git status --porcelain=v1 -uno

- name: Show diff on working copy
run: git diff --cached

- name: Check if packaging changed
run: |
[ -z "$(git status --porcelain=v1 -uno 2>/dev/null)" ]
10 changes: 6 additions & 4 deletions .github/workflows/tests-integration-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,18 @@ jobs:
- uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: ./.github/actions/prepare_poetry_env
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
python-version: ${{ matrix.python-version }}

# - name: Setup Python & Poetry Environment
# uses: ./.github/actions/prepare_poetry_env

- name: Install Lua environment
run: poetry run -- nox -s install_lua_environment

- name: Poetry install
run: poetry run -- nox -s run_in_dev_env -- poetry install
# Open issues:
# - should/can we use PTB here?
# - how to pass python version

- name: Build language container
run: poetry run -- nox -s build_language_container
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/tests-integration-no-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,15 @@ jobs:
- uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: ./.github/actions/prepare_poetry_env
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
python-version: ${{ matrix.python-version }}

# - name: Setup Python & Poetry Environment
# uses: ./.github/actions/prepare_poetry_env

- name: Poetry install
run: poetry run -- nox -s run_in_dev_env -- poetry install
# Open issues:
# - should/can we use PTB here?
# - how to pass python version

- name: Run Python integration tests without db
run: poetry run -- nox -s run_python_test -- ${{ matrix.test-path.path }}
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/tests-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,18 @@ jobs:
- uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: ./.github/actions/prepare_poetry_env
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
python-version: ${{ matrix.python-version }}

# - name: Setup Python & Poetry Environment
# uses: ./.github/actions/prepare_poetry_env

- name: Install Lua environment
run: poetry run -- nox -s install_lua_environment

- name: Poetry install
run: poetry run -- nox -s run_in_dev_env -- poetry install
# Open issues:
# - should/can we use PTB here?
# - how to pass python version

- name: Run Lua unit tests and static code analyzer
run: poetry run -- nox -s run_in_dev_env -- ./scripts/lua_tests.sh
Expand Down

0 comments on commit 229af06

Please sign in to comment.