From ac0d7d5ce82ca348cc68bb1b05d96dc6f8838079 Mon Sep 17 00:00:00 2001 From: Chris Thoburn Date: Thu, 18 Apr 2024 12:03:59 -0700 Subject: [PATCH] chore: remove unneeded infra tests --- .github/workflows/infra-tests.yml | 52 ------------------- package.json | 3 +- packages/unpublished-test-infra/package.json | 1 - .../tests/dummy/app/app.js | 14 ----- .../tests/dummy/app/index.html | 25 --------- .../tests/dummy/app/resolver.js | 3 -- .../tests/dummy/app/router.js | 10 ---- .../dummy/app/routes/application/template.hbs | 6 --- .../tests/dummy/app/styles/app.css | 0 .../tests/dummy/app/templates/application.hbs | 1 - .../tests/dummy/config/environment.js | 52 ------------------- .../tests/dummy/config/optional-features.json | 6 --- .../tests/dummy/config/targets.js | 13 ----- .../tests/dummy/public/.gitkeep | 0 .../unpublished-test-infra/tests/index.html | 41 --------------- .../tests/test-helper.js | 16 ------ .../tests/unit/.gitkeep | 0 .../tests/unit/deprecations-stripped-test.js | 24 --------- 18 files changed, 1 insertion(+), 266 deletions(-) delete mode 100644 .github/workflows/infra-tests.yml delete mode 100644 packages/unpublished-test-infra/tests/dummy/app/app.js delete mode 100644 packages/unpublished-test-infra/tests/dummy/app/index.html delete mode 100644 packages/unpublished-test-infra/tests/dummy/app/resolver.js delete mode 100644 packages/unpublished-test-infra/tests/dummy/app/router.js delete mode 100644 packages/unpublished-test-infra/tests/dummy/app/routes/application/template.hbs delete mode 100644 packages/unpublished-test-infra/tests/dummy/app/styles/app.css delete mode 100644 packages/unpublished-test-infra/tests/dummy/app/templates/application.hbs delete mode 100644 packages/unpublished-test-infra/tests/dummy/config/environment.js delete mode 100644 packages/unpublished-test-infra/tests/dummy/config/optional-features.json delete mode 100644 packages/unpublished-test-infra/tests/dummy/config/targets.js delete mode 100644 packages/unpublished-test-infra/tests/dummy/public/.gitkeep delete mode 100644 packages/unpublished-test-infra/tests/index.html delete mode 100644 packages/unpublished-test-infra/tests/test-helper.js delete mode 100644 packages/unpublished-test-infra/tests/unit/.gitkeep delete mode 100644 packages/unpublished-test-infra/tests/unit/deprecations-stripped-test.js diff --git a/.github/workflows/infra-tests.yml b/.github/workflows/infra-tests.yml deleted file mode 100644 index 832147274fa..00000000000 --- a/.github/workflows/infra-tests.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Infra - -on: - pull_request: - branches: - - main - types: - - labeled - - synchronize - - ready_for_review - -env: - TURBO_API: http://127.0.0.1:9080 - TURBO_TOKEN: this-is-not-a-secret - TURBO_TEAM: myself - -concurrency: - group: infra-${{ github.head_ref || github.ref_name }} - cancel-in-progress: true - -jobs: - test: - if: contains(github.event.pull_request.labels.*.name, 'ci-compat-infra') - timeout-minutes: 10 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - - uses: ./.github/actions/setup - with: - restore-broccoli-cache: true - install: true - repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: pnpm test infra compatWith 3.0 - env: - COMPAT_WITH: '3.0' - run: pnpm test:infra - - name: pnpm test infra compatWith 3.8 - env: - COMPAT_WITH: '3.8' - run: pnpm test:infra - - name: pnpm test infra compatWith 3.12 - env: - COMPAT_WITH: '3.12' - run: pnpm test:infra - - name: pnpm test infra compatWith 3.16 - env: - COMPAT_WITH: '3.16' - run: pnpm test:infra - - name: pnpm test infra compatWith 99.0 - env: - COMPAT_WITH: '99.0' - run: pnpm test:infra diff --git a/package.json b/package.json index 636f449ff34..db6dce8d470 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,7 @@ "test:docs": "FORCE_COLOR=2 pnpm build:docs && pnpm run -r --workspace-concurrency=-1 --if-present test:docs", "test:blueprints": "pnpm run -r --workspace-concurrency=-1 --if-present test:blueprints", "test:fastboot": "pnpm run -r --workspace-concurrency=-1 --if-present test:fastboot", - "test:embroider": "pnpm run -r ---workspace-concurrency=-1 --if-present test:embroider", - "test:infra": "pnpm run -r --workspace-concurrency=-1 --if-present test:infra" + "test:embroider": "pnpm run -r ---workspace-concurrency=-1 --if-present test:embroider" }, "devDependencies": { "@babel/core": "^7.24.4", diff --git a/packages/unpublished-test-infra/package.json b/packages/unpublished-test-infra/package.json index f4e075144ad..f25705b805c 100644 --- a/packages/unpublished-test-infra/package.json +++ b/packages/unpublished-test-infra/package.json @@ -40,7 +40,6 @@ "test": "tests" }, "scripts": { - "test:infra": "ember test", "build:types": "tsc --build --emitDeclarationOnly", "_build": "bun run build:types", "_syncPnpm": "bun run sync-dependencies-meta-injected" diff --git a/packages/unpublished-test-infra/tests/dummy/app/app.js b/packages/unpublished-test-infra/tests/dummy/app/app.js deleted file mode 100644 index 65b2f588b56..00000000000 --- a/packages/unpublished-test-infra/tests/dummy/app/app.js +++ /dev/null @@ -1,14 +0,0 @@ -import Application from '@ember/application'; - -import loadInitializers from 'ember-load-initializers'; - -import config from './config/environment'; -import Resolver from './resolver'; - -export default class App extends Application { - modulePrefix = config.modulePrefix; - podModulePrefix = config.podModulePrefix; - Resolver = Resolver; -} - -loadInitializers(App, config.modulePrefix); diff --git a/packages/unpublished-test-infra/tests/dummy/app/index.html b/packages/unpublished-test-infra/tests/dummy/app/index.html deleted file mode 100644 index 61400b20f56..00000000000 --- a/packages/unpublished-test-infra/tests/dummy/app/index.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - Dummy - - - - {{content-for "head"}} - - - - - {{content-for "head-footer"}} - - - {{content-for "body"}} - - - - - {{content-for "body-footer"}} - - diff --git a/packages/unpublished-test-infra/tests/dummy/app/resolver.js b/packages/unpublished-test-infra/tests/dummy/app/resolver.js deleted file mode 100644 index 2fb563d6c04..00000000000 --- a/packages/unpublished-test-infra/tests/dummy/app/resolver.js +++ /dev/null @@ -1,3 +0,0 @@ -import Resolver from 'ember-resolver'; - -export default Resolver; diff --git a/packages/unpublished-test-infra/tests/dummy/app/router.js b/packages/unpublished-test-infra/tests/dummy/app/router.js deleted file mode 100644 index bb6e77cc4af..00000000000 --- a/packages/unpublished-test-infra/tests/dummy/app/router.js +++ /dev/null @@ -1,10 +0,0 @@ -import EmberRouter from '@ember/routing/router'; - -import config from './config/environment'; - -export default class Router extends EmberRouter { - location = config.locationType; - rootURL = config.rootURL; -} - -Router.map(function () {}); diff --git a/packages/unpublished-test-infra/tests/dummy/app/routes/application/template.hbs b/packages/unpublished-test-infra/tests/dummy/app/routes/application/template.hbs deleted file mode 100644 index 1c967ea89c3..00000000000 --- a/packages/unpublished-test-infra/tests/dummy/app/routes/application/template.hbs +++ /dev/null @@ -1,6 +0,0 @@ - -{{outlet}} diff --git a/packages/unpublished-test-infra/tests/dummy/app/styles/app.css b/packages/unpublished-test-infra/tests/dummy/app/styles/app.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/packages/unpublished-test-infra/tests/dummy/app/templates/application.hbs b/packages/unpublished-test-infra/tests/dummy/app/templates/application.hbs deleted file mode 100644 index e2147cab02d..00000000000 --- a/packages/unpublished-test-infra/tests/dummy/app/templates/application.hbs +++ /dev/null @@ -1 +0,0 @@ -{{outlet}} \ No newline at end of file diff --git a/packages/unpublished-test-infra/tests/dummy/config/environment.js b/packages/unpublished-test-infra/tests/dummy/config/environment.js deleted file mode 100644 index 13f83df1e75..00000000000 --- a/packages/unpublished-test-infra/tests/dummy/config/environment.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -module.exports = function (environment) { - let ENV = { - modulePrefix: 'dummy', - environment, - rootURL: '/', - locationType: 'history', - EmberENV: { - FEATURES: { - // Here you can enable experimental features on an ember canary build - // e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true - }, - EXTEND_PROTOTYPES: { - // Prevent Ember Data from overriding Date.parse. - Date: false, - }, - }, - - APP: { - // Here you can pass flags/options to your application instance - // when it is created - }, - compatWith: process.env.COMPAT_WITH, - }; - - if (environment === 'development') { - // ENV.APP.LOG_RESOLVER = true; - // ENV.APP.LOG_ACTIVE_GENERATION = true; - // ENV.APP.LOG_TRANSITIONS = true; - // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; - // ENV.APP.LOG_VIEW_LOOKUPS = true; - } - - if (environment === 'test') { - // Testem prefers this... - ENV.locationType = 'none'; - - // keep test console output quieter - ENV.APP.LOG_ACTIVE_GENERATION = false; - ENV.APP.LOG_VIEW_LOOKUPS = false; - - ENV.APP.rootElement = '#ember-testing'; - ENV.APP.autoboot = false; - } - - if (environment === 'production') { - // here you can enable a production-specific feature - } - - return ENV; -}; diff --git a/packages/unpublished-test-infra/tests/dummy/config/optional-features.json b/packages/unpublished-test-infra/tests/dummy/config/optional-features.json deleted file mode 100644 index b26286e2ecd..00000000000 --- a/packages/unpublished-test-infra/tests/dummy/config/optional-features.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "application-template-wrapper": false, - "default-async-observers": true, - "jquery-integration": false, - "template-only-glimmer-components": true -} diff --git a/packages/unpublished-test-infra/tests/dummy/config/targets.js b/packages/unpublished-test-infra/tests/dummy/config/targets.js deleted file mode 100644 index b6756da2517..00000000000 --- a/packages/unpublished-test-infra/tests/dummy/config/targets.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -let browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions']; -const isProd = process.env.EMBER_ENV === 'production'; - -if (isProd) { - browsers = ['last 2 Chrome versions', 'last 2 Firefox versions', 'Safari 12', 'last 2 Edge versions']; -} - -module.exports = { - browsers, - node: 'current', -}; diff --git a/packages/unpublished-test-infra/tests/dummy/public/.gitkeep b/packages/unpublished-test-infra/tests/dummy/public/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/packages/unpublished-test-infra/tests/index.html b/packages/unpublished-test-infra/tests/index.html deleted file mode 100644 index 7eceb491196..00000000000 --- a/packages/unpublished-test-infra/tests/index.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - Dummy Tests - - - - {{content-for "head"}} - {{content-for "test-head"}} - - - - - - {{content-for "head-footer"}} - {{content-for "test-head-footer"}} - - - {{content-for "body"}} - {{content-for "test-body"}} - -
-
-
-
-
-
- - - - - - - - {{content-for "body-footer"}} - {{content-for "test-body-footer"}} - - - diff --git a/packages/unpublished-test-infra/tests/test-helper.js b/packages/unpublished-test-infra/tests/test-helper.js deleted file mode 100644 index 63ce2b9da19..00000000000 --- a/packages/unpublished-test-infra/tests/test-helper.js +++ /dev/null @@ -1,16 +0,0 @@ -import { setApplication } from '@ember/test-helpers'; - -import * as QUnit from 'qunit'; -import { setup } from 'qunit-dom'; - -import { start } from 'ember-qunit'; - -import Application from '../app'; -import config from '../config/environment'; - -setup(QUnit.assert); - -setApplication(Application.create(config.APP)); - -QUnit.config.testTimeout = 2000; -start({ setupTestIsolationValidation: true }); diff --git a/packages/unpublished-test-infra/tests/unit/.gitkeep b/packages/unpublished-test-infra/tests/unit/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/packages/unpublished-test-infra/tests/unit/deprecations-stripped-test.js b/packages/unpublished-test-infra/tests/unit/deprecations-stripped-test.js deleted file mode 100644 index cdab5bda853..00000000000 --- a/packages/unpublished-test-infra/tests/unit/deprecations-stripped-test.js +++ /dev/null @@ -1,24 +0,0 @@ -import config from 'dummy/config/environment'; -import { module, test } from 'qunit'; - -import { DEPRECATE_3_12 } from '@ember-data/deprecations'; - -const { compatWith } = config; - -module('test compatWith', function () { - test('deprecation strips', function (assert) { - let deprecation_stripped = true; - - if (DEPRECATE_3_12) { - deprecation_stripped = false; - } - - if (compatWith === '3.0' || compatWith === '3.8') { - assert.false(deprecation_stripped, 'deprecation code was not stripped'); - } else if (compatWith === '3.12' || compatWith === '3.16' || compatWith === '99.0') { - assert.true(deprecation_stripped, 'deprecation code was stripped'); - } else { - // do nothing - } - }); -});