-
-
Notifications
You must be signed in to change notification settings - Fork 844
112 lines (105 loc) · 4.34 KB
/
Copy pathci.yml
File metadata and controls
112 lines (105 loc) · 4.34 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: ci
on:
push: { branches: [main] }
pull_request: { branches: [main] }
permissions: {}
jobs:
tests-checks:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with: { persist-credentials: false }
- run: npm i -g --force corepack && corepack enable
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: { node-version: lts/*, cache: pnpm }
- run: pnpm install
- run: pnpm build
- run: pnpm typecheck
- run: pnpm vitest run test/unit
- run: pnpm vitest run test/minimal
- run: pnpm vitest run test/vite
tests-rollup:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
os: [ubuntu-latest] # windows-latest disabled (flaky)
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with: { persist-credentials: false }
- run: npm i -g --force corepack && corepack enable
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: { node-version: lts/*, cache: pnpm }
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
if: ${{ matrix.os != 'windows-latest' }}
with: { bun-version: latest }
- uses: denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v2.0.4
if: ${{ matrix.os != 'windows-latest' }}
with: { deno-version: 2.8.3 }
- run: node scripts/vite7.ts
- run: pnpm install
- run: pnpm stub && pnpm lint
if: ${{ matrix.os != 'windows-latest' }}
- run: pnpm build
- run: pnpm vitest run test/examples
env: { NITRO_BUILDER: rollup, NITRO_VITE_PKG: vite7 }
- run: pnpm vitest run test/presets
env: { NITRO_BUILDER: rollup, NITRO_VITE_PKG: vite7 }
tests-rolldown:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with: { persist-credentials: false }
- run: npm i -g --force corepack && corepack enable
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: { node-version: lts/*, cache: pnpm }
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
if: ${{ matrix.os != 'windows-latest' }}
with: { bun-version: latest }
- uses: denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v2.0.4
if: ${{ matrix.os != 'windows-latest' }}
with: { deno-version: 2.8.3 }
- run: pnpm install
- run: pnpm build
- run: pnpm vitest run test/examples
env: { NITRO_BUILDER: rolldown, NITRO_VITE_PKG: vite }
- run: pnpm vitest run test/presets
env: { NITRO_BUILDER: rolldown, NITRO_VITE_PKG: vite }
publish-pkg-pr-new:
runs-on: ubuntu-latest
timeout-minutes: 10
needs: [tests-checks, tests-rollup, tests-rolldown]
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with: { fetch-depth: 0, persist-credentials: false }
- run: npm i -fg corepack && corepack enable
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: { node-version: lts/*, cache: "pnpm" }
- run: pnpm install
- run: pnpm build
- run: pnpm dlx pkg-pr-new publish || true
publish-nitro-nightly:
runs-on: ubuntu-latest
timeout-minutes: 10
environment: npm-publish-nightly
permissions: { id-token: write, contents: read }
needs: [tests-checks, tests-rollup, tests-rolldown]
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with: { fetch-depth: 0, persist-credentials: false }
- run: npm i -fg corepack && corepack enable
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: { node-version: lts/*, cache: "pnpm" }
- run: pnpm install
- run: pnpm build
- run: pnpm changelogen --bump -r 3.0.1 --canary nightly
- run: npm i -g npm@latest && npm publish --provenance --access public --tag latest