-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
91 lines (79 loc) · 2.47 KB
/
e2e-test.yml
File metadata and controls
91 lines (79 loc) · 2.47 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: E2E Test
on:
push:
branches:
- next
paths-ignore:
- '**/*.md'
pull_request:
branches:
- next
paths-ignore:
- '**/*.md'
concurrency:
group: ${{ github.workflow }}-#${{ github.event.pull_request.number || github.head_ref || github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
e2e-test:
name: ${{ matrix.project.name }} E2E test
permissions:
contents: read
packages: read
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
project:
- name: cnpmcore
node-version: 24
command: |
npm install
npm run lint -- --quiet
npm run typecheck
npm run build
npm run prepublishOnly
- name: examples
node-version: 24
command: |
# examples/helloworld https://github.com/eggjs/examples/blob/master/helloworld/package.json
cd helloworld
npm install
npm run lint
npm run test
npm run prepublishOnly
cd ..
# examples/hello-tegg https://github.com/eggjs/examples/blob/master/hello-tegg/package.json
cd hello-tegg
npm install
npm run lint
npm run test
npm run prepublishOnly
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: ./.github/actions/clone
with:
ecosystem-ci-project: ${{ matrix.project.name }}
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- name: Set up Node.js
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with:
node-version: ${{ matrix.project.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build all packages
run: pnpm build
- name: Pack packages into tgz
run: |
pnpm -r pack
- name: Override dependencies from tgz in ${{ matrix.project.name }}
working-directory: ecosystem-ci/${{ matrix.project.name }}
run: |
node ../patch-project.ts ${{ matrix.project.name }}
- name: Run e2e test commands in ${{ matrix.project.name }}
working-directory: ecosystem-ci/${{ matrix.project.name }}
run: ${{ matrix.project.command }}