-
Notifications
You must be signed in to change notification settings - Fork 10
71 lines (68 loc) · 2.75 KB
/
app-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Run all e2e tests - Runs daily, on PR, and on demand
on:
workflow_dispatch:
schedule:
# run daily at midnight
- cron: '0 0 * * *'
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: [16]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: npm i --package-lock --package-lock-only
- run: npm ci
- name: Run E2E Tests
env:
JWT_PRIVATE_KEY: ${{ secrets.JWT_PRIVATE_KEY }}
JWT_CLIENTID: ${{ secrets.JWT_CLIENTID }}
JWT_TECH_ACC_ID: ${{ secrets.JWT_TECH_ACC_ID }}
JWT_ORG_ID: ${{ secrets.JWT_ORG_ID }}
JWT_CLIENT_SECRET: ${{ secrets.JWT_CLIENT_SECRET }}
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: |
git config user.name github-actions
git config user.email [email protected]
echo "- $(date) Node ${{ matrix.node }} ${{ job.status == 'success' && '🎉 success' || job.status }}" >> logs/run.md
git add logs/run.md
git commit -m "generated"
git push
- name: Upload Coverage
if: ${{ success() && (github.event_name == 'pull_request' || github.event_name == 'push') }}
uses: codecov/[email protected]
with:
name: ${{ runner.os }} node.js ${{ matrix.node }}
- 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 }}
SLACK_COLOR: ${{ job.status == 'success' && 'good' || job.status == 'cancelled' && '#808080' || 'danger' }}