Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
154 changes: 14 additions & 140 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,164 +12,38 @@ concurrency:
cancel-in-progress: true

jobs:
lint-all-packages:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v7
with:
node-version: 22
node-version-file: .node-version
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm lint

test-all-packages:
name: Ember Tests
runs-on: ${{ matrix.os }}
timeout-minutes: 15

strategy:
fail-fast: false
matrix:
node-version: [20.x, 22.x, 24.x]
os: [ubuntu-latest, windows-latest]

steps:
- name: Checkout Code
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm test:ember-cli-fastboot
- name: Run fastboot Tests
if: ${{ matrix.os != 'windows-latest' }}
run: pnpm test:fastboot
- run: pnpm test:fastboot-express-middleware
- run: pnpm test:fastboot-app-server

test-packages:
name: Test Packages
runs-on: ${{ matrix.os }}
timeout-minutes: 15

strategy:
fail-fast: false
matrix:
node-version: [20.x, 22.x, 24.x]
os: [ubuntu-latest, windows-latest]

steps:
- name: Checkout Code
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm --filter basic-app test:mocha
- run: pnpm --filter ember-cli-fastboot-testing-app test:ember

test-legacy-mocha:
name: Legacy Mocha Tests - ${{ matrix.node-version }}
test:
name: Test (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
timeout-minutes: 15

strategy:
fail-fast: false
matrix:
node-version: [20.x, 22.x, 24.x]
node-version: [22, 24, 26]

steps:
- name: Checkout Code
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm --filter ember-cli-fastboot test:mocha

try-scenarios:
name: 'ember-try for ember-cli-fastboot: ${{ matrix.ember-try-scenario }}'
runs-on: ubuntu-latest
timeout-minutes: 7

strategy:
fail-fast: false
matrix:
ember-try-scenario:
- ember-lts-3.28
- ember-lts-4.4
- ember-lts-4.8
- ember-lts-4.12
- ember-lts-5.4
- ember-lts-5.8
- ember-release
- ember-beta
- ember-canary
- embroider-safe
- embroider-optimized
- no-deprecations
- ember-release-no-deprecations

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: test
run: pnpm --filter ember-cli-fastboot exec ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup

discover_matrix:
runs-on: ubuntu-latest

outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- id: set-matrix
working-directory: test-packages/test-scenarios
run: echo "matrix=$(npm run --silent test:list -- --matrix 'pnpm test --filter %s:')" >> $GITHUB_OUTPUT

scenario-tester:
needs: discover_matrix
name: ${{ matrix.name }}
runs-on: ubuntu-latest
timeout-minutes: 7

strategy:
fail-fast: false
matrix: ${{fromJson(needs.discover_matrix.outputs.matrix)}}

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: test
run: ${{ matrix.command }}
working-directory: test-packages/test-scenarios
- run: pnpm exec playwright install --with-deps chromium
- run: pnpm test
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ concurrency:

jobs:
publish:
name: "NPM Publish"
name: 'NPM Publish'
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
attestations: write

steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v6
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v7
with:
node-version: 24
node-version-file: .node-version
registry-url: 'https://registry.npmjs.org'
cache: pnpm
- run: pnpm install --frozen-lockfile
Expand Down
24 changes: 3 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
node_modules/
dist/
tmp/

# dependencies
bower_components/
node_modules/

# misc
/.sass-cache
/connect.lock
/coverage/
/libpeerconnection.log
/npm-debug.log*
/testem.log
yarn-error.log
test-results/
playwright-report/
.eslintcache

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
26
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dist/
tmp/
pnpm-lock.yaml
CHANGELOG.md
.release-plan.json
test-packages/
patches/
LICENSE.md
.github/workflows/plan-release.yml
7 changes: 0 additions & 7 deletions .prettierrc.js

This file was deleted.

4 changes: 4 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"printWidth": 120
}
29 changes: 0 additions & 29 deletions .vscode/launch.json

This file was deleted.

55 changes: 29 additions & 26 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,43 @@
# How To Contribute

It is always welcome to contribute to FastBoot project! Don't hesitate to open issues, submit PRs, or [chat with community](https://emberjs.com/community) for questions or help.

## Code of Conduct
[Ember Community Guidelines](https://emberjs.com/guidelines/)
# Contributing

## Code organization

This project is organized in a monorepo, you can find the packages published to npm under `packages/` folder:
- `fastboot`
- `ember-cli-fastboot`
- `fastboot-app-server`
- `fastboot-express-middleware`
- `packages/fastboot`: the renderer for Node.js, the request handler, and the Vite plugin
- `packages/ember-cli-fastboot`: the Ember addon (browser boot, `fastboot` service, classic build hooks)
- `test-packages/classic-app`: a classic (ember-cli and broccoli) app for the tests
- `test-packages/vite-app`: a Vite app for the tests
- `tests`: the tests of the whole repository

The `test-packages` folder contains sample apps and integration test suite used for testing the published packages.
The two test apps have the same routes, components, and templates.
When you change one, make the same change in the other.

## Installation
## Set up

* `git clone https://github.com/ember-fastboot/ember-cli-fastboot/`
* `cd ember-cli-fastboot`
* `pnpm install`

## Running tests
```sh
git clone https://github.com/ember-fastboot/ember-cli-fastboot.git
cd ember-cli-fastboot
pnpm install
pnpm exec playwright install chromium
```

If you want to **all** the tests you can run
## Test

```
```sh
pnpm test
```

in the root of the monorepo. You will see that it is calling `npm-run-all` on other scripts listed in `package.json` with the prefix `test:` so if you want to run any specific test again you can just use that package.json sript
The tests build both test apps first. That takes about 20 seconds.
To test the builds that are already on disk, set `SKIP_FIXTURE_BUILD=true`.

CI runs the tests with Node.js 22, 24, and 26.

## Where to write test
## Lint

```sh
pnpm lint
pnpm lint:fix
```

The packages in this monorepo are tightly integrated, consider these when writing new tests:
## Release

* Unit testing individual package: add to the package's own `test` folder
* Integration test that involve multiple packages: add to `test-packages/integration-tests`
* Testing FastBoot rendered sample app as `ember-cli-fastboot` consumer: add to `test-packages/<the-sample-app>/test`
See [RELEASE.md](RELEASE.md).
Loading
Loading