Skip to content

Commit ab2eb3c

Browse files
committed
Add dev dependencies to poetry
1 parent bdfedfc commit ab2eb3c

File tree

4 files changed

+169
-23
lines changed

4 files changed

+169
-23
lines changed

.github/workflows/tests-core.yaml

+25-6
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,29 @@ jobs:
2525
uses: actions/setup-python@v2
2626
with:
2727
python-version: ${{ matrix.python-version }}
28-
- name: Install Package (Local)
29-
run: |
30-
python -m pip install --upgrade pip
31-
pip install .
32-
- name: Run Core Tests
28+
- name: Install Poetry
29+
uses: snok/install-poetry@v1
30+
with:
31+
virtualenvs-create: true
32+
virtualenvs-in-project: true
33+
virtualenvs-path: .venv
34+
35+
- name: Load cached venv
36+
id: cached-poetry-dependencies
37+
uses: actions/cache@v4
38+
with:
39+
path: .venv
40+
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}-dev
41+
42+
- name: Install dependencies
43+
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
44+
run: poetry install --no-interaction --no-root --with dev
45+
46+
- name: Install project
47+
run: poetry install --no-interaction
48+
49+
- name: Run Download Tests
3350
run: |
34-
pytest -ra -v -m "not download"
51+
source .venv/bin/activate
52+
pytest -ra -v -m "download"
53+
coverage report

.github/workflows/tests-download.yaml

+10-6
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
python-version: ["3.10"] # only run expensive downloads on one python version
16+
python-version: ["3.10"] # only run expensive downloads on one (lowest) python version
1717
defaults:
1818
run:
1919
working-directory: ./
2020

2121
steps:
2222
- uses: actions/checkout@v4
23+
2324
- name: Set up Python ${{ matrix.python-version }}
2425
uses: actions/setup-python@v5
2526
with:
@@ -31,20 +32,23 @@ jobs:
3132
virtualenvs-create: true
3233
virtualenvs-in-project: true
3334
virtualenvs-path: .venv
35+
3436
- name: Load cached venv
3537
id: cached-poetry-dependencies
3638
uses: actions/cache@v4
3739
with:
3840
path: .venv
3941
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}-dev
42+
4043
- name: Install dependencies
4144
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
42-
run: poetry install --no-interaction --no-root
45+
run: poetry install --no-interaction --no-root --with dev
46+
47+
- name: Install project
48+
run: poetry install --no-interaction
4349

44-
- name: Install Package (Local)
45-
run: |
46-
python -m pip install --upgrade pip
47-
pip install .
4850
- name: Run Download Tests
4951
run: |
52+
source .venv/bin/activate
5053
pytest -ra -v -m "download"
54+
coverage report

poetry.lock

+128-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+6-5
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,16 @@ dependencies = [
6262
"toml (>=0.10.2,<0.11.0)"
6363
]
6464

65-
66-
[poetry.group.dev.dependencies]
67-
autopep8 = "*"
68-
65+
[tool.poetry.group.dev.dependencies]
66+
pytest = "^8.3.4"
67+
autopep8 = "^2.3.1"
6968

7069
[project.scripts]
7170
auto-archiver = "auto_archiver.__main__:main"
7271

7372
[project.urls]
7473
homepage = "https://github.com/bellingcat/auto-archiver"
7574
repository = "https://github.com/bellingcat/auto-archiver"
76-
documentation = "https://github.com/bellingcat/auto-archiver"
75+
documentation = "https://github.com/bellingcat/auto-archiver"
76+
77+

0 commit comments

Comments
 (0)