Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Platane committed Mar 15, 2024
1 parent f799a24 commit ab6b588
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/recuring-live-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Recuring live test

on:
schedule:
- cron: "0 12 * * *"
- cron: "0 12 */3 * *"

workflow_dispatch:
inputs:
Expand All @@ -21,7 +21,6 @@ jobs:
runs-on: ubuntu-latest
needs: [e2e]
if: always()
# if: always() && github.event_name == 'schedule'
steps:
- run: echo ${{ github.event_name}}

Expand All @@ -33,20 +32,22 @@ jobs:

- uses: oven-sh/setup-bun@v1

- run: echo report=`bunx playwright merge-reports --reporter line packages/e2e/blob-report` >> "$GITHUB_OUTPUT"
id: report
- run: bunx playwright merge-reports --reporter line packages/e2e/blob-report | tee report.text

- run: echo test failed
if: contains(steps.report.outputs.report,'✘')
- run: echo failed=`cat report.txt | grep ✘` >> "$GITHUB_OUTPUT"
id: status

- run: gh issue comment "$NUMBER" --body "$BODY"
# if: contains(steps.report.outputs.report,'✘')
- 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.text
echo "```" >> body.text
cat report.text >> body.text
echo "```" >> body.text
cat body.text
gh issue comment 15 --body-file body.text
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: 15
BODY: |
🚨 e2e test failed [run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
```
${{ steps.report.outputs.report }}
```

0 comments on commit ab6b588

Please sign in to comment.