Run all e2e tests - Runs daily, on PR, and on demand #1344
This file contains hidden or 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: Run all e2e tests - Runs daily, on PR, and on demand | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| # run daily at midnight | |
| - cron: '0 0 * * *' | |
| concurrency: | |
| group: aio-e2e-tests-app-test-log | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| max-parallel: 1 | |
| fail-fast: false | |
| matrix: | |
| node-version: [20.x, 22.x, 24.x] | |
| os: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - run: npm i --package-lock --package-lock-only | |
| - run: npm ci | |
| - name: Run E2E Tests | |
| env: | |
| IMS_CLIENT_ID: ${{ secrets.IMS_CLIENT_ID }} | |
| IMS_ORG_ID: ${{ secrets.IMS_ORG_ID }} | |
| IMS_CLIENT_SECRET: ${{ secrets.IMS_CLIENT_SECRET }} | |
| IMS_SCOPES: ${{ secrets.IMS_SCOPES }} | |
| IMS_ENV: prod | |
| TARGET_TENANT: ${{ secrets.TARGET_TENANT }} | |
| CAMPAIGN_STANDARD_TENANT_ID: ${{ secrets.CAMPAIGN_STANDARD_TENANT_ID }} | |
| ANALYTICS_COMPANY: ${{ secrets.ANALYTICS_COMPANY }} | |
| ANALYTICS_RSID: ${{ secrets.ANALYTICS_RSID }} | |
| AUDIENCE_MANAGER_ID: ${{ secrets.AUDIENCE_MANAGER_ID }} | |
| EVENTS_ORG_ID: ${{ secrets.EVENTS_ORG_ID }} | |
| EVENTS_CONSUMER_ORG_ID: ${{ secrets.EVENTS_CONSUMER_ORG_ID }} | |
| EVENTS_WORKSPACE_ID: ${{ secrets.EVENTS_WORKSPACE_ID }} | |
| EVENTS_PROJECT_ID: ${{ secrets.EVENTS_PROJECT_ID }} | |
| EVENTS_INTEGRATION_ID: ${{ secrets.EVENTS_INTEGRATION_ID }} | |
| RUNTIME_NAMESPACE: ${{secrets.RUNTIME_NAMESPACE}} | |
| RUNTIME_AUTH: ${{secrets.RUNTIME_AUTH}} | |
| CUSTOMER_PROFILE_API_TENANT_ID: ${{secrets.CUSTOMER_PROFILE_API_TENANT_ID}} | |
| run: npm run all | |
| - name: Log to File | |
| if: ${{ always() && (github.event_name == 'schedule') }} | |
| run: | | |
| set -euo pipefail | |
| git config user.name adobe-bot | |
| git config user.email grp-opensourceoffice@adobe.com | |
| git restore --worktree --staged package-lock.json || true | |
| git fetch origin master | |
| git checkout master | |
| git pull --rebase origin master | |
| echo "- $(date) Node ${{ matrix.node-version }} ${{ job.status == 'success' && 'success' || job.status }}" >> logs/run.md | |
| git add logs/run.md | |
| git commit -m "generated" || echo "Nothing to commit" | |
| git push origin HEAD:master | |
| - name: Upload Coverage | |
| if: ${{ success() && (github.event_name == 'pull_request' || github.event_name == 'push') }} | |
| uses: codecov/codecov-action@v3.1.1 | |
| with: | |
| name: ${{ runner.os }} node.js ${{ matrix.node-version }} | |
| - name: Slack Notification | |
| if: ${{ failure() && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }} | |
| uses: rtCamp/action-slack-notify@v2 | |
| env: | |
| SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
| SLACK_TITLE: 'Node version' | |
| SLACK_MESSAGE: ${{ matrix.node-version }} | |
| SLACK_COLOR: ${{ job.status == 'success' && 'good' || job.status == 'cancelled' && '#808080' || 'danger' }} |