Skip to content

Commit

Permalink
👷 Update CICD to use poetry
Browse files Browse the repository at this point in the history
Signed-off-by: ff137 <[email protected]>
  • Loading branch information
ff137 committed Aug 21, 2024
1 parent c475e55 commit c988001
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,10 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine auditwheel
- name: Set up Poetry
uses: abatilo/actions-poetry@v3
with:
poetry-version: "1.8.3"

- name: Fetch library artifacts
uses: actions/download-artifact@v4
Expand All @@ -269,7 +269,8 @@ jobs:
- name: Build wheel package
shell: sh
run: |
python setup.py bdist_wheel --python-tag=py3 --plat-name=${{ matrix.plat-name }}
poetry install --no-dev
python -m build --wheel --plat-name=${{ matrix.plat-name }}
working-directory: wrappers/python

- name: Run tests
Expand All @@ -278,14 +279,14 @@ jobs:
if: ${{ matrix.architecture != 'linux-aarch64' }}
shell: sh
run: |
pip install pytest pytest-asyncio dist/*
poetry install
echo "-- Test SQLite in-memory --"
python -m pytest --log-cli-level=WARNING -k "not contention"
poetry run pytest --log-cli-level=WARNING -k "not contention"
echo "-- Test SQLite file DB --"
TEST_STORE_URI=sqlite://test.db python -m pytest --log-cli-level=WARNING -k "not contention"
TEST_STORE_URI=sqlite://test.db poetry run pytest --log-cli-level=WARNING -k "not contention"
if [ -n "$POSTGRES_URL" ]; then
echo "-- Test Postgres DB --"
TEST_STORE_URI="$POSTGRES_URL" python -m pytest --log-cli-level=WARNING -k "not contention"
TEST_STORE_URI="$POSTGRES_URL" poetry run pytest --log-cli-level=WARNING -k "not contention"
fi
working-directory: wrappers/python
env:
Expand Down Expand Up @@ -313,7 +314,7 @@ jobs:
build-javascript:
name: Build and test JavaScript wrapper
needs: [build-release]

strategy:
matrix:
architecture: [linux-aarch64, linux-x86_64, darwin-universal]
Expand All @@ -326,7 +327,7 @@ jobs:
architecture: darwin-universal

runs-on: ${{ matrix.os }}

defaults:
run:
working-directory: wrappers/javascript
Expand Down

0 comments on commit c988001

Please sign in to comment.