Test e2e #318
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: Test e2e | |
on: | |
schedule: | |
- cron: '30 1 * * *' | |
workflow_dispatch: | |
jobs: | |
test-e2e: | |
runs-on: ubuntu-20.04 | |
name: Test e2e | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Install node | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.node-version' | |
- name: Generate random paths | |
run: | | |
timestamp=$(date +%s) | |
echo TEST_ID=$timestamp >> $GITHUB_OUTPUT | |
id: random-path-generator | |
- name: Install dependencies | |
run: | | |
yarn install | |
npx playwright install | |
- name: Run test | |
run: yarn test:e2e | |
env: | |
TEST_CLIENT_DOMAIN: ${{secrets.TEST_CLIENT_DOMAIN}} | |
TEST_ID: ${{steps.random-path-generator.outputs.TEST_ID}} | |
- name: Report Status | |
if: always() | |
uses: ravsamhq/notify-slack-action@0d9c6ff1de9903da88d24c0564f6e83cb28faca9 | |
with: | |
status: ${{ job.status }} | |
notification_title: "Segment E2E Test has {status_message}" | |
# notify_when: "failure" # Possible values(can be an array of values(comma seperated) or singular): success, failure, cancelled, skipped | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |