Skip to content

Refactors core listing and retrieval API #21

Refactors core listing and retrieval API

Refactors core listing and retrieval API #21

Workflow file for this run

name: CI
on:
push:
branches: [ "**" ]
pull_request:
branches: [ "**" ]
env:
PYTHON_VERSION: "3.13"
DJANGO_SECRET_KEY: dummysecretkeyforci
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Analysing the code with pylint
run: pylint --output-format=json . > pylint.json
- name: Upload pylint report
uses: actions/upload-artifact@v4
with:
name: pylint-report
path: pylint.json
test:
name: Run pytest with coverage
runs-on: ubuntu-latest
env:
DJANGO_DEBUG: "True"
steps:
- uses: actions/checkout@v4
- name: Set up Pythonn ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: pip install -r requirements-dev.txt
- name: Run pytest with coverage
run: |
pytest --cov=. --cov-report=term-missing --cov-report=xml --cov-report=html --cov-fail-under=80 --junitxml=report.xml --html=pytest-report.html
- name: Upload coverage and reports
uses: actions/upload-artifact@v4
with:
name: pytest-reports
path: |
pytest-report.html
htmlcov/
.coverage
coverage.xml
report.xml