cloudflare/kumo

Public

mirrored from https://github.com/cloudflare/kumoAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
main

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.github/workflows/pullrequest.yml

144lines · modecode

1name: Pull Request
2
3on:
4 pull_request:
5 paths-ignore:
6 - "*.md"
7 - ".changeset/**"
8
9permissions:
10 contents: read
11
12concurrency:
13 group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
14 cancel-in-progress: true
15
16jobs:
17 changeset:
18 timeout-minutes: 2
19 runs-on: ubuntu-latest
20 steps:
21 - uses: actions/checkout@v4
22 with:
23 fetch-depth: 0
24 - uses: ./.github/actions/install-dependencies
25 - run: pnpm tsx ci/scripts/validate-kumo-changeset.ts
26
27 build:
28 timeout-minutes: 5
29 runs-on: ubuntu-latest
30 steps:
31 - uses: actions/checkout@v4
32 with:
33 fetch-depth: 1
34 - uses: ./.github/actions/install-dependencies
35 - run: pnpm --filter @cloudflare/kumo build
36 - uses: actions/upload-artifact@v4
37 with:
38 name: kumo-dist
39 path: packages/kumo/dist
40 retention-days: 1
41 - uses: actions/upload-artifact@v4
42 with:
43 name: kumo-ai
44 path: packages/kumo/ai
45 retention-days: 1
46
47 lint:
48 needs: build
49 timeout-minutes: 5
50 runs-on: ubuntu-latest
51 steps:
52 - uses: actions/checkout@v4
53 with:
54 fetch-depth: 1
55 - uses: ./.github/actions/install-dependencies
56 - uses: actions/download-artifact@v4
57 with:
58 name: kumo-dist
59 path: packages/kumo/dist
60 - uses: actions/download-artifact@v4
61 with:
62 name: kumo-ai
63 path: packages/kumo/ai
64 - run: pnpm lint
65
66 typecheck:
67 needs: build
68 timeout-minutes: 5
69 runs-on: ubuntu-latest
70 steps:
71 - uses: actions/checkout@v4
72 with:
73 fetch-depth: 1
74 - uses: ./.github/actions/install-dependencies
75 - uses: actions/download-artifact@v4
76 with:
77 name: kumo-dist
78 path: packages/kumo/dist
79 - uses: actions/download-artifact@v4
80 with:
81 name: kumo-ai
82 path: packages/kumo/ai
83 - run: pnpm typecheck
84
85 test:
86 needs: build
87 timeout-minutes: 5
88 runs-on: ubuntu-latest
89 steps:
90 - uses: actions/checkout@v4
91 with:
92 fetch-depth: 1
93 - uses: ./.github/actions/install-dependencies
94 - uses: actions/download-artifact@v4
95 with:
96 name: kumo-dist
97 path: packages/kumo/dist
98 - uses: actions/download-artifact@v4
99 with:
100 name: kumo-ai
101 path: packages/kumo/ai
102 - run: pnpm --filter @cloudflare/kumo test
103
104 test-react-compatibility:
105 needs: build
106 timeout-minutes: 5
107 runs-on: ubuntu-latest
108 strategy:
109 fail-fast: false
110 matrix:
111 include:
112 - react-version: "18.3.1"
113 types-react-version: "18.3.12"
114 types-react-dom-version: "18.3.1"
115 - react-version: "19.2.0"
116 types-react-version: "19.2.4"
117 types-react-dom-version: "19.2.3"
118 steps:
119 - uses: actions/checkout@v4
120 with:
121 fetch-depth: 1
122 - uses: ./.github/actions/install-dependencies
123 - name: Install React ${{ matrix.react-version }} test dependencies
124 run: |
125 pnpm pkg set \
126 "pnpm.overrides.react=${{ matrix.react-version }}" \
127 "pnpm.overrides.react-dom=${{ matrix.react-version }}" \
128 "pnpm.overrides.@types/react=${{ matrix.types-react-version }}" \
129 "pnpm.overrides.@types/react-dom=${{ matrix.types-react-dom-version }}"
130 pnpm install --no-frozen-lockfile --ignore-scripts --filter "@cloudflare/kumo..."
131 - uses: actions/download-artifact@v4
132 with:
133 name: kumo-dist
134 path: packages/kumo/dist
135 - uses: actions/download-artifact@v4
136 with:
137 name: kumo-ai
138 path: packages/kumo/ai
139 - name: Verify React test versions
140 run: |
141 pnpm --filter @cloudflare/kumo exec node -e "if (require('react/package.json').version !== '${{ matrix.react-version }}') process.exit(1)"
142 pnpm --filter @cloudflare/kumo exec node -e "if (require('react-dom/package.json').version !== '${{ matrix.react-version }}') process.exit(1)"
143 - run: pnpm --filter @cloudflare/kumo typecheck
144 - run: pnpm --filter @cloudflare/kumo test
145