Skip to content

Commit

Permalink
ci: updates tests & includes Node 16.14,18,20
Browse files Browse the repository at this point in the history
  • Loading branch information
Pixelik committed Nov 11, 2023
1 parent 34b5bc5 commit 79962ec
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 33 deletions.
81 changes: 54 additions & 27 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,102 +11,129 @@ on:
tags:
- "*"

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

jobs:
lint:
name: "Linting"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: yarn install --frozen-lockfile --non-interactive
- run: yarn lint:js
- run: yarn lint

ember-tests:
ember-default-tests:
needs: lint
name: "Tests: ubuntu (node@${{ matrix.node-version }})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ["18"]
node-version:
- 16.14
- 18
- 20

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

prefer-native-tests:
needs: ember-tests
prefer-native-ember-default-tests:
needs: ember-default-tests
name: "PREFER_NATIVE=true Tests: ubuntu (node@${{ matrix.node-version }})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ["18"]
node-version:
- 16.14
- 18
- 20

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

native-promise-tests:
needs: ember-tests
native-promise-ember-default-tests:
needs: ember-default-tests
name: "NATIVE_PROMISE=true Tests: ubuntu (node@${{ matrix.node-version }})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ["18"]
node-version:
- 16.14
- 18
- 20

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

node-tests:
needs: ember-tests
needs: ember-default-tests
name: "Node Tests: ubuntu (node@${{ matrix.node-version }})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ["18"]
node-version:
- 16.14
- 18
- 20

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

try-scenarios:
ember-try-scenarios:
name: Tests - ${{ matrix.ember-try-scenario }}
timeout-minutes: 60
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.allow-failure }}
needs: ember-tests
needs: ember-default-tests

strategy:
fail-fast: true
matrix:
ember-try-scenario:
- ember-default
- ember-lts-3.28
- ember-lts-4.4
- ember-lts-4.8
- ember-release
- ember-beta
- ember-canary
- embroider-safe
- embroider-optimized
allow-failure: [false]
include:
- ember-try-scenario: ember-beta
allow-failure: true
- ember-try-scenario: ember-canary
allow-failure: true
- ember-try-scenario: embroider-safe
allow-failure: true
- ember-try-scenario: embroider-optimized
allow-failure: true

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 16.14
- name: install dependencies
run: yarn install
- name: test
Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"start": "ember serve",
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
"test:ember": "ember test",
"test:ember-compatibility": "ember try:each",
"test": "ember test",
"test:node": "ember ts:precompile && mocha && ember ts:clean",
"test:all": "yarn run test:node && ember try:each",
"prepublishOnly": "ember ts:precompile",
"postpublish": "ember ts:clean"
},
Expand Down Expand Up @@ -112,7 +111,7 @@
"ember-source": ">=3.28.0"
},
"engines": {
"node": ">=16.13 || >= 18"
"node": ">=16.14 || >= 18"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/"
Expand All @@ -130,7 +129,7 @@
]
},
"volta": {
"node": "10.24.1",
"node": "16.20.2",
"yarn": "1.22.10"
}
}
1 change: 0 additions & 1 deletion tests/dummy/config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ module.exports = async function () {
'ember-source': await getChannelURL('release'),
},
},
allowedToFail: true,
},
{
name: 'ember-beta',
Expand Down

0 comments on commit 79962ec

Please sign in to comment.