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 48ac2a1
Show file tree
Hide file tree
Showing 7 changed files with 2,774 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 export -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
Loading

0 comments on commit 48ac2a1

Please sign in to comment.