File tree 4 files changed +169
-23
lines changed
4 files changed +169
-23
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,29 @@ jobs:
25
25
uses : actions/setup-python@v2
26
26
with :
27
27
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
33
50
run : |
34
- pytest -ra -v -m "not download"
51
+ source .venv/bin/activate
52
+ pytest -ra -v -m "download"
53
+ coverage report
Original file line number Diff line number Diff line change @@ -13,13 +13,14 @@ jobs:
13
13
runs-on : ubuntu-latest
14
14
strategy :
15
15
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
17
17
defaults :
18
18
run :
19
19
working-directory : ./
20
20
21
21
steps :
22
22
- uses : actions/checkout@v4
23
+
23
24
- name : Set up Python ${{ matrix.python-version }}
24
25
uses : actions/setup-python@v5
25
26
with :
@@ -31,20 +32,23 @@ jobs:
31
32
virtualenvs-create : true
32
33
virtualenvs-in-project : true
33
34
virtualenvs-path : .venv
35
+
34
36
- name : Load cached venv
35
37
id : cached-poetry-dependencies
36
38
uses : actions/cache@v4
37
39
with :
38
40
path : .venv
39
41
key : venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}-dev
42
+
40
43
- name : Install dependencies
41
44
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
43
49
44
- - name : Install Package (Local)
45
- run : |
46
- python -m pip install --upgrade pip
47
- pip install .
48
50
- name : Run Download Tests
49
51
run : |
52
+ source .venv/bin/activate
50
53
pytest -ra -v -m "download"
54
+ coverage report
Original file line number Diff line number Diff line change @@ -62,15 +62,16 @@ dependencies = [
62
62
" toml (>=0.10.2,<0.11.0)"
63
63
]
64
64
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"
69
68
70
69
[project .scripts ]
71
70
auto-archiver = " auto_archiver.__main__:main"
72
71
73
72
[project .urls ]
74
73
homepage = " https://github.com/bellingcat/auto-archiver"
75
74
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
+
You can’t perform that action at this time.
0 commit comments