Recuring live test #34
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: 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 | |
- run: echo ${{ steps.status.outputs.failed }} | |
- run: echo failed | |
if: steps.status.outputs.failed | |
- 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 }} |