-
Notifications
You must be signed in to change notification settings - Fork 70
50 lines (44 loc) · 1.75 KB
/
run-e2e.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
name: E2E Tests
on:
deployment_status:
jobs:
run-e2es:
runs-on: ubuntu-latest
if: >
github.event_name == 'deployment_status' &&
github.event.deployment_status.state == 'success'
steps:
- name: Check environment URL
id: check_env
run: |
if [[ "${{ github.event.deployment_status.environment_url }}" == *"v4-staging"* ]]; then
echo "::set-output name=should_run_tests::true"
else
echo "::set-output name=should_run_tests::false"
echo "This deployment does not require E2E tests. Exiting..."
fi
- name: Checkout
if: steps.check_env.outputs.should_run_tests == 'true'
uses: actions/checkout@v3
- name: Set up pnpm
if: steps.check_env.outputs.should_run_tests == 'true'
uses: dydxprotocol/setup-pnpm@v2.0.0
- name: Set up Node
if: steps.check_env.outputs.should_run_tests == 'true'
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- name: Install dependencies
if: steps.check_env.outputs.should_run_tests == 'true'
run: |
pnpm install --loglevel warn --ignore-scripts --frozen-lockfile
tar -xzC public -f tradingview/tradingview.tgz # manually inline postinstall script
- name: Run e2e tests
if: steps.check_env.outputs.should_run_tests == 'true'
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
E2E_ENVIRONMENT_PASSWORD: ${{ secrets.E2E_ENVIRONMENT_PASSWORD }}
E2E_ENVIRONMENT_URL: ${{ github.event.deployment_status.environment_url }}
run: pnpm exec wdio run ./wdio.conf.ts