Skip to content

Commit 1fa485d

Browse files
committed
fix: github actions
1 parent 4d0bde0 commit 1fa485d

File tree

4 files changed

+890
-37
lines changed

4 files changed

+890
-37
lines changed

.github/workflows/lint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
name: Lint
44

55
on:
6+
push:
67
pull_request:
7-
workflow_call:
88

99
jobs:
1010
lint:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v2
14-
- name: black Lint
14+
- name: Run black
1515
uses: psf/black@stable
1616
with:
1717
options: "--check --diff"
1818
src: "."
1919
version: "22.8.0"
20-
- name: isort Lint
20+
- name: Run isort
2121
uses: isort/isort-action@master
22-
- name: flake8 Lint
22+
- name: Run flake8
2323
uses: py-actions/flake8@v2

.github/workflows/tests.yml

Lines changed: 15 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,41 +11,24 @@ on:
1111
jobs:
1212
tests:
1313
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"
2618
steps:
27-
- name: checkout repo content
19+
- name: Checkout repo content
2820
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
3025
- 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
4932
run: |
5033
less coverage.xml
5134
pip install codecov

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ requests-cache = "^0.9.6"
1515
Pillow = "^10.2.0"
1616
python-magic = "^0.4.27"
1717
tqdm = "^4.64.1"
18+
pandas = "^2.2.1"
1819
openpyxl = "^3.0.10"
1920
mysoc-dataset = "^0.3.0"
2021
django-jsonform = "^2.15.0"
@@ -34,7 +35,6 @@ whitenoise = "^6.6.0"
3435
setuptools = "^69.1.1"
3536
uvicorn = "^0.27.1"
3637
strawberry-graphql = {extras = ["asgi"], version = "^0.220.0"}
37-
pandas = "^2.2.1"
3838

3939
[tool.poetry.dev-dependencies]
4040
black = "^22.8.0"

0 commit comments

Comments
 (0)