Skip to content

Configure eslint-plugin-deprecation #890

Configure eslint-plugin-deprecation

Configure eslint-plugin-deprecation #890

Workflow file for this run

name: Continuous integration
on: [push]
jobs:
runner-job:
runs-on: ubuntu-latest
strategy:
matrix:
django: ["django==4.2.14", "django==5.0.7", "django==5.1"]
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install pnpm
run: npm install -g pnpm
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install javascript packages
working-directory: ./frontend
run: pnpm install
- name: Cache python packages
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements**.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install python packages
run: |
pip install ${{ matrix.django }} && pip install -r example_project/requirements_test.txt && playwright install chromium && pip install -r example_project/requirements_ci.txt && pip install -e .
- name: Run tests
run: python -Wd example_project/manage.py test django_mptt_example
env:
POSTGRES_HOST: localhost
POSTGRES_PASSWORD: postgres
POSTGRES_PORT: 5432
- name: Build javascript
working-directory: ./frontend
run: pnpm run build
- name: Create javascript coverage directory
run: mkdir js_coverage
- name: Test with coverage
run: |
COVERAGE=true coverage run --source=django_mptt_admin,example_project/django_mptt_example example_project/manage.py test django_mptt_example
env:
POSTGRES_HOST: localhost
POSTGRES_PASSWORD: postgres
POSTGRES_PORT: 5432
- name: Merge Python coverage
run: coverage report && coverage lcov
- name: Merge javascript coverage
working-directory: ./coverage
run: pnpm i && pnpm run merge_coverage
- name: Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true