50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
name: Scheduled App Tests
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 6 * * *" # Daily at 06:00 UTC
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
issues: write
|
|
|
|
jobs:
|
|
test:
|
|
name: Live Test All Apps
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Run tests
|
|
id: test
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
python scripts/test-apps.py --json > test-results.json 2>&1 || true
|
|
cat test-results.json
|
|
|
|
- name: Process results and manage issues
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
python scripts/process-test-results.py \
|
|
test-results.json \
|
|
--run-url "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
|
|
|
- name: Fail if any tests failed
|
|
run: |
|
|
python -c "
|
|
import json, sys
|
|
with open('test-results.json') as f:
|
|
data = json.load(f)
|
|
failed = data.get('summary', {}).get('failed', 0)
|
|
if failed > 0:
|
|
print(f'{failed} app(s) failed')
|
|
sys.exit(1)
|
|
print('All apps passed')
|
|
"
|