Skip to content

Commit

Permalink
fix: github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquimds committed Mar 8, 2024
1 parent 04fa6c3 commit ba6dbf2
Show file tree
Hide file tree
Showing 6 changed files with 954 additions and 108 deletions.
46 changes: 0 additions & 46 deletions .github/actions/in-container/action.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
name: Lint

on:
push:
pull_request:
workflow_call:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: black Lint
- name: Run black
uses: psf/black@stable
with:
options: "--check --diff"
src: "."
version: "22.8.0"
- name: isort Lint
- name: Run isort
uses: isort/isort-action@master
- name: flake8 Lint
- name: Run flake8
uses: py-actions/flake8@v2
33 changes: 15 additions & 18 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,24 @@ on:
jobs:
tests:
runs-on: ubuntu-latest
container:
image: python:3.12
env:
POETRY_VIRTUALENVS_CREATE: "false"
steps:

- name: checkout repo content
- name: Checkout repo content
uses: actions/checkout@v2

- name: Install poetry
run: curl -sSL https://install.python-poetry.org | python3 -
- name: Install dependencies
run: ~/.local/bin/poetry export --with dev -f requirements.txt --output requirements.txt && pip install -r requirements.txt
- name: Run django tests
uses: ./.github/actions/in-container
with:
use_dev_image: false
run: |
script/bootstrap
script/test --coverage
# do this inside the docker container otherwise the paths don't work
- name: generate coverage xml
uses: ./.github/actions/in-container
with:
run: coverage xml

# do this outside the docker container otherwise can't get repo details
- name: upload code coverage
run: |
script/bootstrap
coverage run --source=. --branch manage.py test
- name: Generate coverage xml
run: coverage xml
- name: Upload code coverage
run: |
less coverage.xml
pip install codecov
Expand Down
103 changes: 64 additions & 39 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ requests-cache = "^0.9.6"
Pillow = "^10.2.0"
python-magic = "^0.4.27"
tqdm = "^4.64.1"
pandas = "^1.5.1"
pandas = "^2.2.1"
openpyxl = "^3.0.10"
mysoc-dataset = "^0.3.0"
django-jsonform = "^2.15.0"
Expand Down
Loading

0 comments on commit ba6dbf2

Please sign in to comment.