Skip to content

Recuring live test

Recuring live test #33

name: Recuring live test
on:
schedule:
- cron: "0 12 */3 * *"
workflow_dispatch:
inputs:
app_url:
type: string
default: https://timezone.rocks
required: true
jobs:
e2e:
uses: ./.github/workflows/_test-e2e.yml
with:
APP_URL: ${{ inputs.app_url || 'https://timezone.rocks' }}
report:
runs-on: ubuntu-latest
needs: [e2e]
if: always()
steps:
- run: echo ${{ github.event_name}}
- uses: actions/download-artifact@v4
with:
path: blob-report
pattern: e2e-blob-report-*
merge-multiple: true
- uses: oven-sh/setup-bun@v1
- run: bunx playwright merge-reports --reporter line blob-report > report.txt
- run: cat report.txt
- run: echo failed=`cat report.txt | grep ✘` >> "$GITHUB_OUTPUT"
id: status
- name: Leave comment with the report
# if: steps.status.outputs.failed && github.event_name == 'schedule'
run: |
echo "🚨 e2e test failed [run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> body.txt
echo "```" >> body.txt
cat report.txt >> body.txt
echo "```" >> body.txt
cat body.txt
gh issue comment 15 --body-file body.txt
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}