forked from module-federation/core
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (56 loc) · 2.48 KB
/
devtools.yml
File metadata and controls
70 lines (56 loc) · 2.48 KB
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
name: Devtools
on:
workflow_call:
concurrency:
group: devtools-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
main:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout Repository
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js 20
uses: actions/setup-node@v6
with:
node-version: '20'
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Cache Playwright browsers
id: playwright-cache
uses: actions/cache@v5
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-devtools-${{ hashFiles('pnpm-lock.yaml', 'packages/chrome-devtools/package.json') }}
restore-keys: |
${{ runner.os }}-playwright-devtools-
- name: Install dependencies
run: pnpm install --frozen-lockfile && find . -maxdepth 6 -type d \( -name ".cache" -o -name ".modern-js" \) -exec rm -rf {} +
env:
PLAYWRIGHT_CACHE_HIT: ${{ steps.playwright-cache.outputs.cache-hit }}
RUN_DEVTOOLS_POSTINSTALL: 'true'
- name: Restore Turborepo cache
uses: actions/cache/restore@v5
with:
path: .turbo/cache
key: ${{ runner.os }}-turbo-${{ github.ref_name }}-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-turbo-${{ github.ref_name }}-
${{ runner.os }}-turbo-
- name: Install Cypress
run: npx cypress install
- name: Build shared packages
run: pnpm run build:packages
- name: Install xvfb
run: sudo apt-get update && sudo apt-get install xvfb
- name: E2E Chrome Devtools Dev
run: npx kill-port 3009 3010 3011 3012 3013 4001 && pnpm run app:manifest:dev & echo "done" && npx wait-on tcp:3009 tcp:3010 tcp:3011 tcp:3012 tcp:3013 && sleep 10 && pnpm exec turbo run test:e2e --filter=@module-federation/devtools --only
- name: E2E Chrome Devtools Prod
run: npx kill-port 3009 3010 3011 3012 3013 4001 && npx kill-port 3009 3010 3011 3012 3013 4001 && pnpm run app:manifest:prod & echo "done" && npx wait-on tcp:3009 tcp:3010 tcp:3011 tcp:3012 tcp:3013 && sleep 30 && pnpm exec turbo run test:e2e --filter=@module-federation/devtools --only
- name: Kill devtools ports
run: npx kill-port 3013 3009 3010 3011 3012 4001 || true