-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (44 loc) · 1.46 KB
/
nightly-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Test upcoming upstream changes
# Inspired by: https://github.com/torchbox/wagtailmedia/blob/main/.github/workflows/nightly-tests.yml
on:
schedule:
# Run every Monday at midnight
- cron: "0 0 * * 1"
# Or manually to test
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 == 'Stormbase/django-otp-webauthn' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: pip
- name: Install additional system packages
run: |
sudo apt-get update -y
# Need `gettext` to compile translations
sudo apt-get install gettext
- name: Install dependencies
run: |
python -m pip install tox requests .[testing]
- name: Compile translations
run: |
/bin/sh ./compile_translations.sh
- name: Run 'future' tests
id: test
continue-on-error: true
run: |
tox -e future
- 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 }}