File tree Expand file tree Collapse file tree 4 files changed +890
-37
lines changed Expand file tree Collapse file tree 4 files changed +890
-37
lines changed Original file line number Diff line number Diff line change 3
3
name : Lint
4
4
5
5
on :
6
+ push :
6
7
pull_request :
7
- workflow_call :
8
8
9
9
jobs :
10
10
lint :
11
11
runs-on : ubuntu-latest
12
12
steps :
13
13
- uses : actions/checkout@v2
14
- - name : black Lint
14
+ - name : Run black
15
15
uses : psf/black@stable
16
16
with :
17
17
options : " --check --diff"
18
18
src : " ."
19
19
version : " 22.8.0"
20
- - name : isort Lint
20
+ - name : Run isort
21
21
uses : isort/isort-action@master
22
- - name : flake8 Lint
22
+ - name : Run flake8
23
23
uses : py-actions/flake8@v2
Original file line number Diff line number Diff line change 11
11
jobs :
12
12
tests :
13
13
runs-on : ubuntu-latest
14
- services :
15
- postgres :
16
- image : postgres
17
- env :
18
- POSTGRES_PASSWORD : postgres
19
- options : >-
20
- --health-cmd pg_isready
21
- --health-interval 10s
22
- --health-timeout 5s
23
- --health-retries 5
24
- ports :
25
- - 5432:5432
14
+ container :
15
+ image : python:3.12
16
+ env :
17
+ POETRY_VIRTUALENVS_CREATE : " false"
26
18
steps :
27
- - name : checkout repo content
19
+ - name : Checkout repo content
28
20
uses : actions/checkout@v2
29
-
21
+ - name : Install poetry
22
+ run : curl -sSL https://install.python-poetry.org | python3 -
23
+ - name : Install dependencies
24
+ run : ~/.local/bin/poetry export --with dev -f requirements.txt --output requirements.txt && pip install -r requirements.txt
30
25
- name : Run django tests
31
- uses : ./.github/actions/in-container
32
- env :
33
- DATABASE_URL : postgres://postgres:postgres@postgres/postgres
34
- CACHE_FILE : /tmp/meep
35
- SECRET_KEY : keyboardcat
36
- with :
37
- run : |
38
- script/bootstrap
39
- script/test --coverage
40
-
41
- # do this inside the docker container otherwise the paths don't work
42
- - name : generate coverage xml
43
- uses : ./.github/actions/in-container
44
- with :
45
- run : coverage xml
46
-
47
- # do this outside the docker container otherwise can't get repo details
48
- - name : upload code coverage
26
+ run : |
27
+ script/bootstrap
28
+ coverage run --source=. --branch manage.py test
29
+ - name : Generate coverage xml
30
+ run : coverage xml
31
+ - name : Upload code coverage
49
32
run : |
50
33
less coverage.xml
51
34
pip install codecov
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ requests-cache = "^0.9.6"
15
15
Pillow = " ^10.2.0"
16
16
python-magic = " ^0.4.27"
17
17
tqdm = " ^4.64.1"
18
+ pandas = " ^2.2.1"
18
19
openpyxl = " ^3.0.10"
19
20
mysoc-dataset = " ^0.3.0"
20
21
django-jsonform = " ^2.15.0"
@@ -34,7 +35,6 @@ whitenoise = "^6.6.0"
34
35
setuptools = " ^69.1.1"
35
36
uvicorn = " ^0.27.1"
36
37
strawberry-graphql = {extras = [" asgi" ], version = " ^0.220.0" }
37
- pandas = " ^2.2.1"
38
38
39
39
[tool .poetry .dev-dependencies ]
40
40
black = " ^22.8.0"
You can’t perform that action at this time.
0 commit comments