Delete the ingredient image from the disk if the entry is deleted fro… #2204
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration | |
on: | |
push: | |
branches: [ master, ] | |
paths: | |
- '**.py' | |
- 'requirements.txt' | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [ master, ] | |
paths: | |
- '**.py' | |
- 'requirements.txt' | |
jobs: | |
ci-job: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
#TODO: pypy3 has problems compiling lxml | |
python-version: [ '3.10', '3.11', '3.12' ] | |
name: CI job (python ${{ matrix.python-version }}) | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
cache: 'pip' | |
python-version: ${{ matrix.python-version }} | |
- name: Display Python version | |
run: python -c "import sys; print(sys.version)" | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip | |
pip install wheel coverage | |
pip install -r requirements_dev.txt | |
pip install -r requirements_prod.txt | |
pip install -e . | |
# Only run the tests with coverage for one version of python | |
- name: Test the application with coverage | |
if: matrix.python-version == 3.11 | |
run: | | |
wger create-settings | |
coverage run --source='.' ./manage.py test | |
coverage lcov | |
- name: Test the application | |
if: matrix.python-version != 3.11 | |
run: | | |
wger create-settings | |
python manage.py test | |
- name: Coveralls | |
if: matrix.python-version == 3.11 | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: coverage.lcov |