Skip to content

Commit

Permalink
Add test-app
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Nov 5, 2024
1 parent 3f7b708 commit 061807b
Show file tree
Hide file tree
Showing 41 changed files with 726 additions and 71 deletions.
96 changes: 25 additions & 71 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,69 +16,19 @@ jobs:
name: "Linting"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn install --frozen-lockfile --non-interactive
- run: yarn lint:js
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
- run: pnpm lint

ember-tests:
tests:
needs: lint
name: "Tests: ubuntu (node@${{ matrix.node-version }})"
name: "Tests"
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["12"]

steps:
- uses: actions/checkout@v2
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile --non-interactive
- run: yarn test

prefer-native-tests:
needs: ember-tests
name: "PREFER_NATIVE=true Tests: ubuntu (node@${{ matrix.node-version }})"
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["12"]

steps:
- uses: actions/checkout@v2
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile --non-interactive
- run: PREFER_NATIVE=true yarn test

native-promise-tests:
needs: ember-tests
name: "NATIVE_PROMISE=true Tests: ubuntu (node@${{ matrix.node-version }})"
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["12"]

steps:
- uses: actions/checkout@v2
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile --non-interactive
- run: NATIVE_PROMISE=true yarn test

node-tests:
needs: ember-tests
name: "Node Tests: ubuntu (node@${{ matrix.node-version }})"
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["12"]

steps:
- uses: actions/checkout@v2
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile --non-interactive
- run: yarn run test:node
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
- run: pnpm test

try-scenarios:
name: Tests - ${{ matrix.ember-try-scenario }}
Expand All @@ -91,23 +41,27 @@ jobs:
fail-fast: true
matrix:
ember-try-scenario:
- ember-lts-3.4
- ember-lts-3.8
- ember-lts-3.12
- ember-lts-3.16
- ember-lts-3.20
- ember-lts-3.24
# - ember-lts-3.4
# - ember-lts-3.8
# - ember-lts-3.12
# - ember-lts-3.16
# - ember-lts-3.20
# - ember-lts-3.24
- 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-lts-5.12
- ember-release
- ember-beta
allow-failure: [false]
include:
- ember-try-scenario: ember-canary
allow-failure: true
steps:
- uses: actions/checkout@v2
with:
node-version: 12.x
- name: install dependencies
run: yarn install
- name: test
run: node_modules/.bin/ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
- run: node_modules/.bin/ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup
working-directory: test-app
19 changes: 19 additions & 0 deletions test-app/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2

[*.hbs]
insert_final_newline = false

[*.{diff,md}]
trim_trailing_whitespace = false
7 changes: 7 additions & 0 deletions test-app/.ember-cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
/**
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
*/
"isTypeScriptProject": true
}
14 changes: 14 additions & 0 deletions test-app/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# unconventional js
/blueprints/*/files/

# compiled output
/declarations/
/dist/

# misc
/coverage/
!.*
.*/

# ember-try
/.node_modules.ember-try/
55 changes: 55 additions & 0 deletions test-app/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
'use strict';

module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
},
plugins: ['ember', '@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:prettier/recommended',
],
env: {
browser: true,
},
rules: {},
overrides: [
// ts files
{
files: ['**/*.ts'],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {},
},
// node files
{
files: [
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./testem.js',
'./blueprints/*/index.js',
'./config/**/*.js',
'./lib/*/index.js',
'./server/**/*.js',
],
env: {
browser: false,
node: true,
},
extends: ['plugin:n/recommended'],
},
{
// test files
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
],
};
53 changes: 53 additions & 0 deletions test-app/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on:
push:
branches:
- main
- master
pull_request: {}

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

jobs:
lint:
name: "Lint"
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm lint

test:
name: "Test"
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Run Tests
run: pnpm test
25 changes: 25 additions & 0 deletions test-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# compiled output
/dist/
/declarations/

# dependencies
/node_modules/

# misc
/.env*
/.pnp*
/.eslintcache
/coverage/
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try

# broccoli-debug
/DEBUG/
13 changes: 13 additions & 0 deletions test-app/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# unconventional js
/blueprints/*/files/

# compiled output
/dist/

# misc
/coverage/
!.*
.*/

# ember-try
/.node_modules.ember-try/
12 changes: 12 additions & 0 deletions test-app/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use strict';

module.exports = {
overrides: [
{
files: '*.{js,ts}',
options: {
singleQuote: true,
},
},
],
};
8 changes: 8 additions & 0 deletions test-app/.stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# unconventional files
/blueprints/*/files/

# compiled output
/dist/

# addons
/.node_modules.ember-try/
5 changes: 5 additions & 0 deletions test-app/.stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'],
};
5 changes: 5 additions & 0 deletions test-app/.template-lintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
extends: 'recommended',
};
3 changes: 3 additions & 0 deletions test-app/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ignore_dirs": ["dist"]
}
Loading

0 comments on commit 061807b

Please sign in to comment.