construction_worker: Update CI to reflect the switch to poetry
@@ -23,20 +23,16 @@ jobs:
include:
- name: 3.6
python-version: 3.6
- pip-command: pip install .
- pytest-command: pytest
+ pytest-command: poetry run pytest
- name: 3.7
python-version: 3.7
- pip-command: pip install .
- pytest-command: pytest
+ pytest-command: poetry run pytest
- name: 3.8-remote-data
python-version: 3.8
- pip-command: pip install .
- pytest-command: pytest --remote-data --doctest-modules
+ pytest-command: poetry run pytest --remote-data --doctest-modules
- name: 3.8-no-optional-dependencies
python-version: 3.8
- pip-command: pip install .
- pytest-command: pytest
+ pytest-command: poetry run pytest
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
@@ -45,9 +41,8 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
- python -m pip install --upgrade pip setuptools wheel
- python -m pip install -r requirements-test.txt
- ${{ matrix.pip-command }}
+ python -m pip install --upgrade pip poetry
+ poetry install
- name: Test with ${{ matrix.pytest-command }}
run: |
${{ matrix.pytest-command }}
@@ -67,12 +62,11 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
- python -m pip install --upgrade pip setuptools wheel
- python -m pip install -r requirements-test.txt
- pip install .
+ python -m pip install --upgrade pip poetry
+ poetry install
- name: Test with pytest --remote-data
run: |
- pytest --remote-data
+ poetry run pytest --remote-data
# Run unit tests on Mac OSX
pytest-osx:
@@ -88,12 +82,11 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
- python -m pip install --upgrade pip setuptools wheel
- python -m pip install -r requirements-test.txt
- pip install .
+ python -m pip install --upgrade pip poetry
+ poetry install
- name: Test with pytest
run: |
- pytest
+ poetry run pytest
# Use the `flake8` tool to check for syntax errors
flake8-linter:
@@ -109,11 +102,11 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install flake8
run: |
- python -m pip install --upgrade pip
- python -m pip install flake8
+ python -m pip install --upgrade pip poetry
+ poetry install
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude="setup.py,test_*"
+ poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude="setup.py,test_*"
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude="setup.py,test_*"
+ poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude="setup.py,test_*"
