Skip to content

Commit

Permalink
ci: update ember-try config, add embroider test scenarios
Browse files Browse the repository at this point in the history
- Add `@embroider/test-setup` package and config
- Remove Canary scenario from `ember-try`
- Remove `ember-` prefix from ember-try configuration
- Update Ember LTS versions in `ember-try`
  • Loading branch information
yonmey committed Sep 6, 2021
1 parent f198a2c commit b840bda
Show file tree
Hide file tree
Showing 9 changed files with 12,339 additions and 23 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@
#$ browsers:
#$ - chrome
#$ emberTryScenarios:
#$ - scenario: ember-lts-3.16
#$ - scenario: ember-lts-3.20
#$ - scenario: ember-release
#$ - scenario: ember-beta
#$ - scenario: ember-canary
#$ - scenario: ember-default-with-jquery
#$ - scenario: ember-classic
#$ - scenario: lts-3.20
#$ - scenario: lts-3.24
#$ - scenario: release
#$ - scenario: beta
#$ - scenario: default-with-jquery
#$ - scenario: classic
#$ nodeVersion: 12.x
#$ packageManager: yarn
#
Expand Down Expand Up @@ -172,11 +171,11 @@ jobs:
fail-fast: true
matrix:
ember-try-scenario:
- ember-lts-3.16
- ember-lts-3.20
- ember-release
- ember-default-with-jquery
- ember-classic
- lts-3.20
- lts-3.24
- release
- default-with-jquery
- classic

steps:
- uses: actions/checkout@v2
Expand Down
223 changes: 223 additions & 0 deletions .github/workflows/ci.yml.orig
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
# This file was autogenerated by create-github-actions-setup-for-ember-addons.
#
# You can upgrade the GitHub Actions workflow to the latest blueprints used
# by Create GitHub Actions setup for Ember Addons by running it again:
#
# - `yarn create github-actions-setup-for-ember-addons` if using yarn and
# - `npm init github-actions-setup-for-ember-addons` if using NPM.
#
# See https://github.com/jelhan/create-github-actions-setup-for-ember-addon for
# details.
#
# The following lines contain the configuration used in the last run. Please do
# not change them. Doing so could break upgrade flow.
#
#$ browsers:
#$ - chrome
#$ emberTryScenarios:
#$ - scenario: lts-3.20
#$ - scenario: lts-3.24
#$ - scenario: release
#$ - scenario: beta
#$ - scenario: default-with-jquery
#$ - scenario: classic
#$ nodeVersion: 12.x
#$ packageManager: yarn
#

name: CI

on:
push:
branches:
- master
pull_request:

env:
NODE_VERSION: '12.x'

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1

- uses: actions/setup-node@v2-beta
with:
node-version: '${{ env.NODE_VERSION }}'

- name: Get package manager's global cache path
id: global-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache package manager's global cache and node_modules
id: cache-dependencies
uses: actions/cache@v2
with:
path: |
${{ steps.global-cache-dir-path.outputs.dir }}
node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-${{
hashFiles('**/yarn.lock'
) }}
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}-

- name: Install Dependencies
run: yarn install --frozen-lockfile
if: |
steps.cache-dependencies.outputs.cache-hit != 'true'

- name: Lint
run: yarn lint


test:
name: Tests
runs-on: ${{ matrix.os }}
needs: lint

strategy:
matrix:
os: [ubuntu-latest]
browser: [chrome]

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1

- uses: actions/setup-node@v2-beta
with:
node-version: '${{ env.NODE_VERSION }}'

- name: Get package manager's global cache path
id: global-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache package manager's global cache and node_modules
id: cache-dependencies
uses: actions/cache@v2
with:
path: |
${{ steps.global-cache-dir-path.outputs.dir }}
node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-${{
hashFiles('**/yarn.lock'
) }}
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}-

- name: Install Dependencies
run: yarn install --frozen-lockfile
if: |
steps.cache-dependencies.outputs.cache-hit != 'true'

- name: Test
run: yarn test:ember --launch ${{ matrix.browser }}


floating-dependencies:
name: Floating Dependencies
runs-on: ${{ matrix.os }}
needs: lint

strategy:
matrix:
os: [ubuntu-latest]
browser: [chrome]

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1

- uses: actions/setup-node@v2-beta
with:
node-version: '${{ env.NODE_VERSION }}'

- name: Get package manager's global cache path
id: global-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache package manager's global cache and node_modules
id: cache-dependencies
uses: actions/cache@v2
with:
path: |
${{ steps.global-cache-dir-path.outputs.dir }}
node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-floating-deps
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}-

- name: Install Dependencies
run: yarn install --no-lockfile --non-interactive

- name: Test
run: yarn test:ember --launch ${{ matrix.browser }}


try-scenarios:
name: Tests - ${{ matrix.ember-try-scenario }}
runs-on: ubuntu-latest
continue-on-error: true
needs: test

strategy:
fail-fast: true
matrix:
ember-try-scenario:
<<<<<<< HEAD
- ember-lts-3.16
- ember-lts-3.20
- ember-release
- ember-default-with-jquery
- ember-classic
=======
- lts-3.20
- lts-3.24
- release
- beta
- default-with-jquery
- classic
>>>>>>> ci: update ember-try config, add embroider test scenarios

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1

- uses: actions/setup-node@v2-beta
with:
node-version: '${{ env.NODE_VERSION }}'

- name: Get package manager's global cache path
id: global-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache package manager's global cache and node_modules
id: cache-dependencies
uses: actions/cache@v2
with:
path: |
${{ steps.global-cache-dir-path.outputs.dir }}
node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-${{
hashFiles('**/yarn.lock'
) }}
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}-

- name: Install Dependencies
run: yarn install --frozen-lockfile
if: |
steps.cache-dependencies.outputs.cache-hit != 'true'

- name: Test
env:
EMBER_TRY_SCENARIO: ${{ matrix.ember-try-scenario }}
run: node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO
19 changes: 11 additions & 8 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,30 @@
'use strict'

const getChannelURL = require('ember-source-channel-url')
const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup')

module.exports = async function () {
return {
useYarn: true,
scenarios: [
{
name: 'ember-lts-3.16',
name: 'lts-3.20',
npm: {
devDependencies: {
'ember-source': '~3.16.0',
'ember-source': '~3.20.5',
},
},
},
{
name: 'ember-lts-3.20',
name: 'lts-3.24',
npm: {
devDependencies: {
'ember-source': '~3.20.5',
'ember-source': '~3.24.3',
},
},
},
{
name: 'ember-release',
name: 'release',
npm: {
devDependencies: {
'ember-source': await getChannelURL('release'),
Expand All @@ -36,13 +37,13 @@ module.exports = async function () {
// `ember try:each` manually or from a customized CI config will run it
// along with all the other scenarios.
{
name: 'ember-default',
name: 'default',
npm: {
devDependencies: {},
},
},
{
name: 'ember-default-with-jquery',
name: 'default-with-jquery',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'jquery-integration': true,
Expand All @@ -55,7 +56,7 @@ module.exports = async function () {
},
},
{
name: 'ember-classic',
name: 'classic',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'application-template-wrapper': true,
Expand All @@ -69,6 +70,8 @@ module.exports = async function () {
},
},
},
embroiderSafe(),
embroiderOptimized(),
],
}
}
Loading

0 comments on commit b840bda

Please sign in to comment.