-
Notifications
You must be signed in to change notification settings - Fork 64
69 lines (60 loc) · 1.84 KB
/
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: e2e
on:
# allow manual dispatch
workflow_dispatch:
inputs:
debug:
type: boolean
required: false
default: false
# run after deploy
workflow_run:
workflows: ["Deploy"]
branches: ["staging"]
types:
- completed
jobs:
e2e:
name: 'Hangar E2E Tests'
runs-on: ubuntu-latest
steps:
- name: BrowserStack Env Setup
uses: browserstack/github-actions/setup-env@master
with:
username: ${{ secrets.BROWSERSTACK_USERNAME }}
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Cache Pnpm
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install e2e deps
env:
CI: true
run: (cd e2e && pnpm install --frozen-lockfile)
- name: Run e2e tests
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
BROWSERSTACK_DEBUG: ${{ github.event.inputs.debug || false }}
E2E_PASSWORD: ${{ secrets.E2E_PASSWORD }}
E2E_TOTP_SECRET: ${{ secrets.E2E_TOTP_SECRET }}
E2E_API_KEY: ${{ secrets.E2E_API_KEY }}
run: (cd e2e && pnpm run browserstack-multiple)