-
Notifications
You must be signed in to change notification settings - Fork 8
62 lines (52 loc) · 1.64 KB
/
app-preview.yaml
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
name: Companion App
on:
pull_request:
defaults:
run:
working-directory: ./deployables/app
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy & Test
defaults:
run:
working-directory: ./deployables/app
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: latest
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- run: pnpm install --prefer-offline
- run: pnpm build
- name: Deploy
id: deploy
uses: cloudflare/[email protected]
with:
workingDirectory: deployables/app
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: versions upload
# If you think this sucks, you are right.
# Check https://github.com/cloudflare/wrangler-action/issues/343
# and we can just use the deployment-url output of
# the deploy action
- uses: kaisugi/[email protected]
id: regex
with:
text: ${{ steps.deploy.outputs.command-output }}
regex: 'https:\/\/.+\.gnosisguild\.workers\.dev'
- name: Install Playwright Browsers
run: pnpm playwright install --with-deps chromium
- name: Run Playwright tests
run: xvfb-run pnpm playwright test
env:
PLAYWRIGHT_TEST_BASE_URL: ${{ steps.regex.outputs.match }}
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30