Skip to content

Commit

Permalink
Update to Poetry from setup.py
Browse files Browse the repository at this point in the history
The setup.py-style builds are deprecated. PEP 517 introduced the pyproject.toml
way of packing Python projects. This commit switches to this new mechanism and
uses the Poetry build system. The advantage of this system is that a
Rust-inspired lock file is created to lock down exact dependencies and all but
guarantees that future users will be able to build and use the project.

Further, this commit fixes up CI to use Poetry.

Support for Python 3.6 is dropped since it is no longer supported and the
gherkin-formatter does not want to play nice with 3.6.

Testing against Python 3.10 is added.

Other file changes are reformatting due to new formatter versions.
  • Loading branch information
pdietl committed Sep 19, 2022
1 parent e7a6bf3 commit 16e03a9
Show file tree
Hide file tree
Showing 11 changed files with 1,223 additions and 115 deletions.
49 changes: 28 additions & 21 deletions .github/workflows/transient.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,42 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install python dependencies
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e '.[dev]'
python3 -m pip install --upgrade pip
python3 -m pip install poetry
poetry install
- name: Check Format
run: |
make check-format
poetry run make check-format
- name: Check Types
run: |
make check-types
poetry run make check-types
UnitTests:
runs-on: ubuntu-18.04
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9, "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install python dependencies
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e '.[dev]'
python3 -m pip install --upgrade pip
python3 -m pip install poetry
poetry install
- name: Test with pytest
run: |
make unittest
poetry run make unittest
Ubuntu-2004-Docker:
runs-on: ubuntu-18.04
Ubuntu-Docker:
runs-on: ubuntu-22.04
strategy:
fail-fast: true
matrix:
feature:
- cli
Expand All @@ -60,8 +63,9 @@ jobs:
- ssh_command
- sshfs
- sanity
docker_ubuntu_version: [20.04, 22.04]
container:
image: ubuntu:20.04
image: ubuntu:${{ matrix.docker_ubuntu_version }}
env:
DEBIAN_FRONTEND: noninteractive
steps:
Expand All @@ -73,16 +77,16 @@ jobs:
- name: Install python dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -e '.[dev]'
python3 -m pip install poetry
poetry install
- name: Run tests
run: |
make test-docker-behave-ci-${{ matrix.feature }}.feature
poetry run make test-docker-behave-ci-${{ matrix.feature }}.feature
Ubuntu-1804-VM:
runs-on: ubuntu-18.04
Ubuntu-VM:
strategy:
matrix:
python-version: [3.6, 3.8]
python-version: [3.7, "3.10"]
feature:
- cli
- build
Expand All @@ -94,6 +98,8 @@ jobs:
- ssh_command
- sshfs
- sanity
os: [18.04]
runs-on: ubuntu-${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install package dependencies
Expand All @@ -106,8 +112,9 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e '.[dev]'
python3 -m pip install --upgrade pip
python3 -m pip install poetry
poetry install
- name: Run tests
run: |
make test-behave-ci-${{ matrix.feature }}.feature
poetry run make test-behave-ci-${{ matrix.feature }}.feature
Loading

0 comments on commit 16e03a9

Please sign in to comment.