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 682fcc6
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 69 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 install -vvv
- 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
2 changes: 1 addition & 1 deletion poetry.lock

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

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ python-benedict = "^0.33.2"
gunicorn = "^21.2.0"
whitenoise = "^6.6.0"
setuptools = "^69.1.1"
# Explicit numpy requirement improves poetry install speed
numpy = "^1.26.4"

[tool.poetry.dev-dependencies]
django-debug-toolbar = "^3.7.0"
Expand Down

0 comments on commit 682fcc6

Please sign in to comment.