Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test-app for each ember major version #410

Merged
merged 29 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b6c3dc6
Rename `test-app` folder to `test-app-3.x`
mkszepp Jun 26, 2024
928d94f
Add `test-app-5x`
mkszepp Jun 26, 2024
b06a9a1
Add `test-app-4.x` & remove `ember-data` dependency
mkszepp Jun 26, 2024
4b51133
Switch from `scenario-tester` to `ember-try`
mkszepp Jun 26, 2024
3567859
Fix ci
mkszepp Jun 26, 2024
15893f4
Fix lint
mkszepp Jun 26, 2024
dc5e4cb
Fix lint
mkszepp Jun 26, 2024
d735c4f
Update ci & gitignore
mkszepp Jun 26, 2024
86704f2
Add `--test-port 0` to fix test
mkszepp Jun 26, 2024
7a15c45
Remove `test:ember-compatibility`
mkszepp Jun 26, 2024
82745e2
Fix ci
mkszepp Jun 26, 2024
909f593
Update ci
mkszepp Jun 26, 2024
5d1060a
Use `concurrently` in test-app-3.x
mkszepp Jun 26, 2024
a468f2e
Update ci
mkszepp Jun 26, 2024
26bc83f
Add rule for helper
mkszepp Jun 26, 2024
751abbc
Add `concurrently` to 3.x test app
mkszepp Jun 26, 2024
9e19b41
Fix testapp 3.x
mkszepp Jun 26, 2024
6d4dcd1
Try to fix embroider
mkszepp Jun 26, 2024
8a5c056
Set `@embroider/test-setup` to v4
mkszepp Jun 26, 2024
8b51755
Fix package log and prepare script
mkszepp Jun 26, 2024
7c6129c
Remove `npm-run-all` not anymore needed, we are on pnpm
mkszepp Jun 26, 2024
0ed168b
Remove .eslintcache file
mkszepp Jun 26, 2024
8c3c5cc
Update ember-try in test-app v3
mkszepp Jun 26, 2024
2b0f384
Add npmignore to new test-apps & fix gitignore
mkszepp Jun 26, 2024
15bd7c8
Fix ci
mkszepp Jun 26, 2024
3148c84
Add nolockfile for try-scenarios
mkszepp Jun 26, 2024
ce3279b
Try to fix resolver
mkszepp Jun 26, 2024
326d2cb
Remove resolver
mkszepp Jun 26, 2024
23d4e5c
Move helper to test-app helper inside app to fix embroider-safe
mkszepp Jun 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

# compiled output
/dist/
/test-app/dist
/test-app/tmp
/test-app-3.x/dist
/test-app-3.x/tmp

# dependencies
/bower_components/
/node_modules/
/test-app/node_modules
/test-app-3.x/node_modules

# misc
/coverage/
Expand Down
112 changes: 91 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,115 @@
name: Node CI
name: CI

on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
- master
pull_request: {}

concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
lint:
test:
name: "Tests"
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
mkszepp marked this conversation as resolved.
Show resolved Hide resolved
- run: pnpm lint
- name: Lint
run: pnpm lint
- name: Run Tests
run: pnpm test

test:
floating:
name: "Floating Dependencies"
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
mkszepp marked this conversation as resolved.
Show resolved Hide resolved
- run: pnpm test:ember
- id: set-matrix
run: echo "::set-output name=matrix::$(pnpm scenario-tester list --files ./scenarios.js --matrix 'pnpm qunit ./scenarios.js --filter %s:')"
working-directory: test-app
- name: Run Tests
run: pnpm test

try-scenarios-ember-3x:
name: ${{ matrix.try-scenario }}
runs-on: ubuntu-latest
needs: 'test'
timeout-minutes: 10

strategy:
fail-fast: false
matrix:
try-scenario:
- ember-lts-3.16
- ember-lts-3.20
- ember-lts-3.24
- ember-lts-3.28
- embroider-safe
- embroider-optimized

compat-scenarios:
needs: test
name: ${{ matrix.name }}
steps:
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
with:
args: "--no-lockfile"
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} --skip-cleanup
working-directory: test-app-3.x

try-scenarios-ember-4x:
name: ${{ matrix.try-scenario }}
runs-on: ubuntu-latest
needs: 'test'
timeout-minutes: 10

strategy:
fail-fast: false
matrix: ${{fromJson(needs.test.outputs.matrix)}}
matrix:
try-scenario:
- ember-lts-4.4
- ember-lts-4.8
- ember-lts-4.12
- embroider-safe
- embroider-optimized

steps:
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
with:
args: "--no-lockfile"
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} --skip-cleanup
working-directory: test-app-4.x

try-scenarios-ember-5x:
name: ${{ matrix.try-scenario }}
runs-on: ubuntu-latest
needs: 'test'
timeout-minutes: 10

strategy:
fail-fast: false
matrix:
try-scenario:
- ember-lts-5.4
- ember-lts-5.8
- ember-release
- ember-beta
- ember-canary
- embroider-safe
- embroider-optimized

steps:
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
- run: ${{ matrix.command }}
working-directory: test-app
with:
args: "--no-lockfile"
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} --skip-cleanup
working-directory: test-app-5.x
10 changes: 4 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/test-app/dist/
/test-app/tmp/
dist/
tmp/

# dependencies
/node_modules/
/test-app/node_modules
node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/.eslintcache
.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
Expand Down
35 changes: 8 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,16 @@
"dist"
],
"scripts": {
"clean": "rm -rf dist node_modules test-app/node_modules",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
"lint:hbs": "ember-template-lint .",
"lint:js": "eslint .",
"lint:devdeps": "addon-dev sync-dev-deps --lint",
"scenario:list": "scenario-tester list --files test-app/scenarios.js",
"scenario:output": "scenario-tester output --files test-app/scenarios.js --outdir scenario --scenario ",
"scenario:run": "cd test-app && qunit scenarios.js --filter ",
"start": "npm-run-all --parallel start:*",
"start:test-app": "cd test-app && ember serve",
"clean": "rm -rf dist node_modules test-app-3.x/node_modules test-app-4.x/node_modules test-app-5.x/node_modules",
"lint": "pnpm --filter '*' lint",
"lint:fix": "pnpm --filter '*' lint:fix",
"start": "concurrently 'pnpm:start:*' --restart-after 5000 --prefix-colors cyan,white,yellow",
"start:test-app": "pnpm --filter test-app-5.x start",
"start:build": "rollup --config --watch",
"sync-dev-deps": "addon-dev sync-dev-deps",
"test": "npm-run-all lint:* test:*",
"test:ember": "cd test-app && ember test",
"test:ember-compatibility": "cd test-app && qunit scenarios.js",
"prepare": "npm-run-all prepublishOnly",
"test": "pnpm --filter '*' test",
mkszepp marked this conversation as resolved.
Show resolved Hide resolved
"test:ember": "pnpm --filter '*' test:ember",
"prepare": "pnpm run prepublishOnly",
"prepublishOnly": "rollup --config"
},
"dependencies": {
Expand All @@ -57,14 +51,9 @@
"babel-eslint": "^10.1.0",
"ember-auto-import": "^2.3.0",
"ember-cli": "~3.28.5",
"ember-cli-3.16": "npm:ember-cli@~3.16.0",
mkszepp marked this conversation as resolved.
Show resolved Hide resolved
"ember-cli-3.20": "npm:ember-cli@~3.20.0",
"ember-cli-3.24": "npm:ember-cli@~3.24.0",
"ember-cli-babel": "^7.26.10",
"ember-cli-beta": "npm:ember-cli@beta",
"ember-cli-htmlbars": "^5.7.2",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-latest": "npm:ember-cli@latest",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.2",
"ember-disable-prototype-extensions": "^1.1.3",
Expand All @@ -75,13 +64,7 @@
"ember-qunit": "^5.1.5",
"ember-resolver": "^8.0.3",
"ember-source": "~3.28.8",
"ember-source-3.16": "npm:ember-source@~3.16.0",
"ember-source-3.20": "npm:ember-source@~3.20.0",
"ember-source-3.24": "npm:ember-source@~3.24.0",
"ember-source-beta": "npm:ember-source@beta",
"ember-source-canary": "npm:ember-source@alpha",
"ember-source-channel-url": "^3.0.0",
"ember-source-latest": "npm:ember-source@latest",
"ember-template-lint": "^3.15.0",
"ember-try": "^1.4.0",
"eslint": "^7.32.0",
Expand All @@ -93,14 +76,12 @@
"jquery": "^3.6.0",
"loader.js": "^4.7.0",
"moment-timezone": "^0.5.33",
"npm-run-all": "^4.1.5",
"prettier": "^2.5.1",
"qunit": "^2.17.2",
"qunit-console-grouper": "^0.3.0",
"qunit-dom": "^1.6.0",
"release-plan": "^0.9.0",
"rollup": "^2.63.0",
"scenario-tester": "^2.0.1",
"webpack": "^5.65.0"
},
"peerDependencies": {
Expand Down
Loading