Update to 5.2.7, 5.1.13, and 4.2.25 (#694) #1223
This file contains hidden or 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] | |
| jobs: | |
| runner-job: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| django: ["django==4.2.25", "django==5.1.13", "django==5.2.7"] | |
| 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: Build javascript | |
| working-directory: ./frontend | |
| run: pnpm run build | |
| - name: Javascript test | |
| working-directory: ./frontend | |
| run: pnpm run test:coverage | |
| - name: Collect static files | |
| run: python manage.py collectstatic --no-input | |
| working-directory: example_project | |
| - 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@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| verbose: true |