Skip to content

Commit d33f1dc

Browse files
authored
Merge pull request #317 from ember-cli/nvp/its-vite-time
Vite + fix canary and beta ci jobs
2 parents 80832b1 + 19410ec commit d33f1dc

71 files changed

Lines changed: 2551 additions & 8827 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 89 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,69 @@ on:
88
pull_request: {}
99

1010
jobs:
11+
build_matrix:
12+
name: "Build Matrix"
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 5
15+
outputs:
16+
matrix: ${{ steps.set-matrix.outputs.matrix }}
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 1
21+
- uses: pnpm/action-setup@v4
22+
- uses: actions/setup-node@v6
23+
with:
24+
node-version-file: package.json
25+
cache: pnpm
26+
- id: set-matrix
27+
run: |
28+
echo "matrix=$(pnpm dlx @embroider/try list)" >> $GITHUB_OUTPUT
29+
working-directory: test-app
30+
31+
# We do this so we ensure that we test with the same
32+
# assets each time.
33+
# (And don't have build or use prepare each phase of ci,
34+
# (saving water, hopefully))
35+
build_addon:
36+
name: "Build Addon"
37+
runs-on: ubuntu-latest
38+
timeout-minutes: 5
39+
steps:
40+
- uses: actions/checkout@v4
41+
with:
42+
fetch-depth: 1
43+
- uses: wyvox/action-setup-pnpm@v3
44+
- run: pnpm build
45+
- uses: actions/upload-artifact@v4
46+
with:
47+
name: dist
48+
path: |
49+
addon/dist/
50+
addon/declarations/
51+
1152
lint:
1253
name: Lint
1354
runs-on: ubuntu-latest
1455
timeout-minutes: 20
56+
needs: [build_addon]
1557
steps:
1658
- uses: actions/checkout@v4
1759
with:
1860
fetch-depth: 1
1961
- uses: wyvox/action-setup-pnpm@v3
20-
- run: pnpm build
62+
- uses: actions/download-artifact@v4
63+
with:
64+
name: dist
65+
path: addon
2166
- name: Lint
2267
run: pnpm lint
2368

2469
test:
2570
name: Tests
2671
runs-on: ${{ matrix.os }}
2772
timeout-minutes: 20
28-
needs: lint
73+
needs: [build_addon]
2974

3075
strategy:
3176
matrix:
@@ -37,9 +82,14 @@ jobs:
3782
with:
3883
fetch-depth: 1
3984
- uses: wyvox/action-setup-pnpm@v3
40-
- run: pnpm build
85+
- uses: actions/download-artifact@v4
86+
with:
87+
name: dist
88+
path: addon
4189
- name: Test
42-
run: pnpm test:ember --launch ${{ matrix.browser }}
90+
run: pnpm test:ember
91+
env:
92+
CI_BROWSER: ${{ matrix.browser }}
4393
working-directory: test-app
4494

4595
floating-dependencies:
@@ -60,13 +110,19 @@ jobs:
60110
- uses: wyvox/action-setup-pnpm@v3
61111
with:
62112
pnpm-args: "--no-lockfile"
63-
- run: pnpm build
113+
- uses: actions/download-artifact@v4
114+
with:
115+
name: dist
116+
path: addon
64117
- name: Test
65-
run: pnpm test:ember --launch ${{ matrix.browser }}
118+
run: pnpm test:ember
119+
env:
120+
CI_BROWSER: ${{ matrix.browser }}
66121
working-directory: test-app
67122

68123
typecheck:
69124
name: "${{ matrix.typescript-scenario }}"
125+
needs: [test]
70126
runs-on: ubuntu-latest
71127
timeout-minutes: 2
72128
continue-on-error: true
@@ -83,8 +139,10 @@ jobs:
83139
steps:
84140
- uses: actions/checkout@v4
85141
- uses: wyvox/action-setup-pnpm@v3
86-
- run: pnpm build
87-
- run: pnpm i -f # just in case
142+
- uses: actions/download-artifact@v4
143+
with:
144+
name: dist
145+
path: addon
88146
- name: "test-types : ${{ matrix.typescript-scenario }}"
89147
working-directory: ./test-types
90148
run: "pnpm add --save-dev ${{ matrix.typescript-scenario}}"
@@ -107,39 +165,35 @@ jobs:
107165
pnpm ember-tsc
108166
109167
try-scenarios:
110-
name: Tests - ${{ matrix.ember-try-scenario }}
111168
runs-on: ubuntu-latest
112169
timeout-minutes: 20
113170
continue-on-error: ${{ matrix.allow-failure }}
114-
needs: test
115-
171+
needs: [test, build_matrix]
116172
strategy:
117173
fail-fast: false
118-
matrix:
119-
ember-try-scenario: [
120-
minimum-supported-4-2,
121-
ember-lts-4.4,
122-
ember-lts-4.12,
123-
ember-lts-5.12,
124-
ember-release,
125-
ember-beta
126-
ember-canary,
127-
]
128-
allow-failure: [false]
129-
include:
130-
- ember-try-scenario: ember-canary
131-
allow-failure: true
174+
matrix: ${{fromJson(needs.build_matrix.outputs.matrix)}}
175+
176+
name: "${{ matrix.name }}"
132177

133178
steps:
134179
- uses: actions/checkout@v4
135180
with:
136181
fetch-depth: 1
137-
- uses: wyvox/action-setup-pnpm@v3
138-
- run: pnpm build
139-
- name: Test
140-
env:
141-
EMBER_TRY_SCENARIO: ${{ matrix.ember-try-scenario }}
142-
run: node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup
182+
- uses: pnpm/action-setup@v4
183+
- uses: actions/setup-node@v6
184+
with:
185+
node-version-file: package.json
186+
cache: pnpm
187+
- run: pnpm dlx @embroider/try apply ${{ matrix.name }}
188+
working-directory: test-app
189+
- run: pnpm install --no-lockfile --ignore-scripts
190+
- uses: actions/download-artifact@v4
191+
with:
192+
name: dist
193+
path: addon
194+
195+
- run: pnpm test:ember
196+
env: ${{ matrix.env }}
143197
working-directory: test-app
144198

145199
docs:
@@ -152,8 +206,10 @@ jobs:
152206
with:
153207
fetch-depth: 1
154208
- uses: wyvox/action-setup-pnpm@v3
155-
- run: pnpm build
156-
209+
- uses: actions/download-artifact@v4
210+
with:
211+
name: dist
212+
path: addon
157213
- name: Test
158214
run: pnpm test:ember
159215
working-directory: docs

CONTRIBUTING.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,9 @@ Inside any of the packages you can run:
1919
- `pnpm lint`
2020
- `pnpm lint:fix`
2121

22-
## Running tests
23-
24-
- `cd test-app && ember test` – Runs the test suite on the current Ember version
25-
- `cd test-app && ember test --server` – Runs the test suite in "watch mode"
26-
- `cd test-app & ember try:each` – Runs the test suite against multiple Ember versions
27-
2822
## Running the test application
2923

30-
- `cd test-app && ember serve`
24+
- `cd test-app && pnpm vite`
3125
- Visit the test application at [http://localhost:4200](http://localhost:4200).
3226

3327
For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).

addon/.eslintignore

Lines changed: 0 additions & 22 deletions
This file was deleted.

addon/.eslintrc.cjs

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)