Skip to content

Commit b1ec44d

Browse files
committed
try updating the CI configs to work with poetry
1 parent 4fd5e78 commit b1ec44d

File tree

3 files changed

+40
-6
lines changed

3 files changed

+40
-6
lines changed

.github/workflows/format.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,20 @@ jobs:
1717
uses: actions/setup-python@v4
1818
with:
1919
python-version: ${{ matrix.python-version }}
20+
- name: Set up Poetry
21+
uses: snok/install-poetry@v1 # v1.3.4 at time of adoption
22+
with:
23+
poetry-version: "1.7.1"
24+
- uses: actions/cache@v3
25+
with:
26+
path: |
27+
~/.cache/pypoetry/virtualenvs
28+
~/.cache/pytest
29+
key: ${{ runner.os }}-poetry-tests-${{ hashFiles('poetry.lock') }}
2030
- name: Install project
21-
run: pip install .[formatting]
31+
run: poetry sync --no-interaction --with formatting
2232
- name: Run codespell
2333
run: codespell --enable-colors
2434
- name: Run ruff
25-
run: ruff format --diff .
35+
run: ruff format --diff .
36+

.github/workflows/lint.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,20 @@ jobs:
1717
uses: actions/setup-python@v4
1818
with:
1919
python-version: ${{ matrix.python-version }}
20+
- name: Set up Poetry
21+
uses: snok/install-poetry@v1 # v1.3.4 at time of adoption
22+
with:
23+
poetry-version: "1.7.1"
24+
- uses: actions/cache@v3
25+
with:
26+
path: |
27+
~/.cache/pypoetry/virtualenvs
28+
~/.cache/pytest
29+
key: ${{ runner.os }}-poetry-tests-${{ hashFiles('poetry.lock') }}
2030
- name: Install project
21-
run: pip install .[linting]
31+
run: poetry sync --no-interaction --with linting
2232
- name: Run mypy on Python ${{ matrix.python-version }} on ${{ matrix.os }}
2333
run: mypy
2434
- name: Run ruff on Python ${{ matrix.python-version }} on ${{ matrix.os }}
2535
run: ruff check .
36+

.github/workflows/tests.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,25 @@ jobs:
1111
os: [ ubuntu-latest, macos-latest, windows-latest, ubuntu-20.04 ]
1212
runs-on: ${{ matrix.os }}
1313

14+
1415
steps:
1516
- uses: actions/checkout@v3
16-
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
17+
- name: Set up Python ${{ matrix.python-version }}
1718
uses: actions/setup-python@v4
1819
with:
1920
python-version: ${{ matrix.python-version }}
21+
- name: Set up Poetry
22+
uses: snok/install-poetry@v1 # v1.3.4 at time of adoption
23+
with:
24+
poetry-version: "1.7.1"
25+
- uses: actions/cache@v3
26+
with:
27+
path: |
28+
~/.cache/pypoetry/virtualenvs
29+
~/.cache/pytest
30+
key: ${{ runner.os }}-poetry-tests-${{ hashFiles('poetry.lock') }}
2031
- name: Install project
21-
run: python -m pip install .[testsuite]
32+
run: poetry sync --no-interaction --with testsuite
2233
- name: Run unit tests on Python ${{ matrix.python-version }} on ${{ matrix.os }}
23-
run: pytest
34+
run: poetry run pytest -v
35+

0 commit comments

Comments
 (0)