-
Notifications
You must be signed in to change notification settings - Fork 1.5k
103 lines (90 loc) · 2.72 KB
/
apps-pool-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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Sushi - apps / pool / e2e
on:
pull_request:
types: [opened, synchronize]
paths:
- ".github/workflows/apps-pool-e2e.yml"
- "apps/earn/**"
- "config/graph/**"
- "config/nextjs/**"
- "config/react-query/**"
- "config/router/**"
- "config/tailwindcss/**"
- "config/typescript/**"
- "config/viem/**"
- "config/wagmi/**"
- "packages/**"
defaults:
run:
# change this if your nextjs app does not live at the root of the repo
working-directory: ./apps/earn
# https://playwright.dev/docs/ci#sharding
env:
CI: true
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
NODE_OPTIONS: --max-old-space-size=8192
NEXT_TELEMETRY_DISABLED: 1
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
e2e:
timeout-minutes: 30
runs-on: ubuntu-latest
env:
ANVIL_BLOCK_NUMBER: 42259027
strategy:
matrix:
chain-id: [137]
node-version: [18]
pnpm-version: [7.9.5]
block-number: [42259027]
steps:
- name: Check out
uses: actions/checkout@v3
with:
fetch-depth: 2
submodules: true
- uses: pnpm/action-setup@v2
with:
version: ${{ matrix.pnpm-version }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Cache pnpm
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: pnpm-
- name: Install dependencies
run: pnpm install
working-directory: .
- name: Install playwright
run: pnpm exec playwright install --with-deps chromium
- name: Forge RPC cache
uses: actions/cache@v3
with:
path: "$HOME/.foundry/cache"
key: rpc-cache-${{ matrix.node-version }}-${{ matrix.chain-id }}-${{ matrix.block-number }}
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Test pools app
run: pnpm test-earn-app
env:
ALCHEMY_ID: ${{ secrets.NEXT_PUBLIC_ALCHEMY_ID }}
PLAYWRIGHT_URL: http://localhost:3000/pools
CHAIN_ID: ${{ matrix.chain-id }}
ANVIL_FORK_URL: ${{ secrets.ANVIL_FORK_URL }}
NEXT_PUBLIC_ALCHEMY_ID: ${{ secrets.NEXT_PUBLIC_ALCHEMY_ID }}
NEXT_PUBLIC_TEST: true
working-directory: .
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: playwright-report
path: ./apps/earn/test-results/