-
-
Notifications
You must be signed in to change notification settings - Fork 848
106 lines (100 loc) · 3.44 KB
/
Copy pathci.yml
File metadata and controls
106 lines (100 loc) · 3.44 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
name: ci
on:
push: { branches: [main] }
pull_request: { branches: [main] }
jobs:
tests-checks:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v6
- run: npm i -g --force corepack && corepack enable
- uses: actions/setup-node@v6
with: { node-version: lts/*, cache: pnpm }
- run: pnpm install
- run: pnpm stub && pnpm lint
- run: pnpm test:types
- run: pnpm vitest run test/unit
- run: pnpm vitest run test/minimal
tests-rollup:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- run: npm i -g --force corepack && corepack enable
- uses: actions/setup-node@v6
with: { node-version: lts/*, cache: pnpm }
- uses: oven-sh/setup-bun@v2
if: ${{ matrix.os != 'windows-latest' }}
with: { bun-version: latest }
- uses: denoland/setup-deno@v1
if: ${{ matrix.os != 'windows-latest' }}
with: { deno-version: 2.6 }
- run: pnpm install
- run: pnpm stub && pnpm lint
if: ${{ matrix.os != 'windows-latest' }}
- run: pnpm test:types
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@v6
- run: npm i -g --force corepack && corepack enable
- uses: actions/setup-node@v6
with: { node-version: lts/*, cache: pnpm }
- uses: oven-sh/setup-bun@v2
if: ${{ matrix.os != 'windows-latest' }}
with: { bun-version: latest }
- uses: denoland/setup-deno@v1
if: ${{ matrix.os != 'windows-latest' }}
with: { deno-version: 2.6 }
- 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@v6
with: { fetch-depth: 0 }
- run: npm i -fg corepack && corepack enable
- uses: actions/setup-node@v6
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
permissions: { id-token: write, contents: read }
needs: [tests-checks, tests-rollup, tests-rolldown]
if: contains('refs/heads/main', github.ref) && github.event_name == 'push'
steps:
- uses: actions/checkout@v6
with: { fetch-depth: 0 }
- run: npm i -fg corepack && corepack enable
- uses: actions/setup-node@v6
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 --tag latest