Skip to content

Update renovatebot/github-action action to v46 #661

Update renovatebot/github-action action to v46

Update renovatebot/github-action action to v46 #661

Workflow file for this run

---
name: test
env:
# yamllint disable-line rule:line-length
TEMPLATE_URL: "https://github.com/lincolnloop/django-layout/zipball/${{ github.ref_name }}"
RUN: docker compose run --rm --no-deps
"on":
schedule:
- cron: "0 5 * * 0"
push:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Install uv
uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7
with:
enable-cache: false
ignore-empty-workdir: true
- name: Create Django project from template
run: |
uv run --with django django-admin startproject \
--template="$TEMPLATE_URL" \
--extension=py,md,gitignore,yaml,json,toml \
--name=Makefile,Dockerfile \
--exclude=.github \
project_name .
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Build and cache
uses: docker/bake-action@5be5f02ff8819ecd3092ea6b2e6261c31774f2b4 # v6
with:
load: true
set: |
*.cache-from=type=gha
*.cache-to=type=gha,mode=max
source: .
- name: Initialize project
run: make init
- name: Start dependencies
run: docker compose up db -d
# pytest-cov doesn't support parallel mode, so manually set the coverage
# filename with a random suffix so it can be combined with other runs.
- name: Run tests
run: >-
${RUN} -e COVERAGE_FILE=.coverage.$RANDOM app
pytest --cov --cov-report= --junitxml=junit.xml
- name: Check missing migrations
run: ${RUN} app coverage run -m manage makemigrations --check
- name: Start dev server
run: docker compose up -d
timeout-minutes: 5
- name: Show running Docker containers
run: docker ps
- name: Test dev server
run: curl -I --retry 10 --retry-all-errors --fail localhost:8000/
- name: Generate coverage report
run: ${RUN} app bash -c "coverage combine && coverage xml"
- name: Upload coverage reports to Codecov
# Publish coverage on success, fail, but not cancel.
if: success() || failure()
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}
- name: Upload test results to Codecov
# Upload JUnit test reports for test analytics
if: success() || failure()
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}
- name: Dump Docker logs
run: |
set -x
docker compose ps
docker compose logs
if: always()