Nightly Wagtail test #304
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: Nightly Wagtail test | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
jobs: | |
nightly-test: | |
# Cannot check the existence of secrets, so limiting to repository name to prevent all forks to run nightly. | |
# See: https://github.com/actions/runner/issues/520 | |
if: ${{ github.repository == 'wagtail/wagtail-hallo' }} | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:16 | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install "psycopg>=3.1.8" | |
pip install "git+https://github.com/wagtail/wagtail.git@main#egg=wagtail" | |
pip install -e .[testing] | |
- name: Test | |
id: test | |
continue-on-error: true | |
run: | | |
python testmanage.py test | |
env: | |
DATABASE_ENGINE: django.db.backends.postgresql | |
DATABASE_HOST: localhost | |
DATABASE_USER: postgres | |
DATABASE_PASS: postgres | |
- name: Send Slack notification on failure | |
if: steps.test.outcome == 'failure' | |
run: | | |
python .github/report_nightly_build_failure.py | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |