Skip to content

Commit a99980d

Browse files
committed
ci: fix worflow files to use poetry
1 parent 6a3b2ff commit a99980d

File tree

2 files changed

+24
-15
lines changed

2 files changed

+24
-15
lines changed

.github/workflows/ci-tests.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818

1919
jobs:
2020
build:
21-
runs-on: ubuntu-22.04
21+
runs-on: ubuntu-latest
2222
strategy:
2323
matrix:
2424
python_version: [
@@ -44,19 +44,23 @@ jobs:
4444
path: ~/.cache/pre-commit
4545
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
4646

47+
- name: Install Poetry
48+
run: |
49+
curl -sSL https://install.python-poetry.org | python3 -
50+
poetry --version
51+
4752
- name: Install dependencies
4853
run: |
49-
pip install -r requirements_dev.txt
54+
poetry install --with dev
5055
51-
- name: style & lint checks
56+
- name: Style & lint checks
5257
run: |
53-
pre-commit run --all-files --color=always
58+
poetry run pre-commit run --all-files --color=always
5459
5560
- name: pytest and coverage
5661
run: |
57-
pip install -e .
58-
coverage run --source=routingpy --module pytest
59-
coverage lcov --include "routingpy/*"
62+
poetry run coverage run --source=routingpy --module pytest
63+
poetry run coverage lcov --include "routingpy/*"
6064
env:
6165
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6266

@@ -69,7 +73,7 @@ jobs:
6973

7074
coveralls:
7175
needs: build
72-
runs-on: ubuntu-22.04
76+
runs-on: ubuntu-latest
7377
steps:
7478
- uses: actions/checkout@v4
7579
- name: Download coverage artifact

.github/workflows/publish-tags.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
build_wheels:
12-
runs-on: ubuntu-22.04
12+
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v4
1515

@@ -18,15 +18,20 @@ jobs:
1818
with:
1919
python-version: "3.10"
2020

21+
- name: Install Poetry
22+
run: |
23+
curl -sSL https://install.python-poetry.org | python3 -
24+
poetry --version
25+
2126
- name: Build Wheels
2227
run: |
23-
pip install -r requirements_dev.txt
24-
python -m build --wheel
28+
poetry build
2529
26-
- name: Upload wheels
30+
- name: Upload distributions (wheels and sdist)
2731
uses: actions/upload-artifact@v4
2832
with:
29-
path: dist/*.whl
33+
name: distributions
34+
path: dist/*
3035

3136
upload_all:
3237
needs: [build_wheels]
@@ -38,10 +43,10 @@ jobs:
3843
with:
3944
python-version: "3.10"
4045

41-
- name: Download artifact
46+
- name: Download distributions
4247
uses: actions/download-artifact@v4
4348
with:
44-
name: artifact
49+
name: distributions
4550
path: dist
4651

4752
- uses: pypa/gh-action-pypi-publish@v1.4.2

0 commit comments

Comments
 (0)