Skip to content

Commit

Permalink
Merge pull request #5 from movableink/use-lts-ember-data
Browse files Browse the repository at this point in the history
chore(ci): match Ember Data version in LTS tests
  • Loading branch information
alexlafroscia authored Mar 20, 2020
2 parents 524fac1 + e1d1e72 commit 83c0d77
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 61 deletions.
75 changes: 49 additions & 26 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,79 @@
on: [push]

jobs:
install:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: volta-cli/action@v1
- name: Cache Dependencies
uses: actions/cache@v1
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
id: yarn-cache
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
${{ runner.os }}-yarn-
- name: Install Dependencies
run: yarn install
- name: Run ESLint
run: yarn lint:js -f tap

lint:
needs: install
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: volta-cli/action@v1
- name: Cache Dependencies
uses: actions/cache@v1
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
id: yarn-cache
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: Run ESLint
run: yarn lint:js -f tap
${{ runner.os }}-yarn-
- name: Install Dependencies
run: yarn install
- name: Run Tests
run: yarn test
env:
CI: true

test:
needs: install
ember-try:
needs: test
runs-on: ubuntu-latest
strategy:
matrix:
ember-try-scenario: [ember-default, ember-lts-3.12, ember-lts-3.16, ember-release, ember-beta, ember-canary, ember-classic]
ember-try-scenario: [ember-lts-3.12, ember-lts-3.16, ember-release, ember-beta, ember-canary]
steps:
- uses: actions/checkout@v1
- uses: volta-cli/action@v1
- name: Cache Dependencies
uses: actions/cache@v1
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
id: yarn-cache
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
${{ runner.os }}-yarn-
- name: Install Dependencies
run: yarn install
- name: Build Scenario
run: yarn ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup=true --- ember build --environment=test
env:
CI: true
- name: Store Build Artifact for Debugging
uses: actions/upload-artifact@v1
with:
name: ${{ matrix.ember-try-scenario }}-dist
path: ./dist
- name: Run Tests
run: yarn ember try:one ${{ matrix.ember-try-scenario }}
run: yarn ember test --path ./dist
env:
CI: true


27 changes: 2 additions & 25 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = async function() {
name: 'ember-lts-3.12',
npm: {
devDependencies: {
'ember-data': '~3.12.0',
'ember-source': '~3.12.0'
}
}
Expand All @@ -18,6 +19,7 @@ module.exports = async function() {
name: 'ember-lts-3.16',
npm: {
devDependencies: {
'ember-data': '~3.16.0',
'ember-source': '~3.16.0'
}
}
Expand Down Expand Up @@ -45,31 +47,6 @@ module.exports = async function() {
'ember-source': await getChannelURL('canary')
}
}
},
// The default `.travis.yml` runs this scenario via `yarn test`,
// not via `ember try`. It's still included here so that running
// `ember try:each` manually or from a customized CI config will run it
// along with all the other scenarios.
{
name: 'ember-default',
npm: {
devDependencies: {}
}
},
{
name: 'ember-classic',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'application-template-wrapper': true,
'default-async-observers': false,
'template-only-glimmer-components': false
})
},
npm: {
ember: {
edition: 'classic'
}
}
}
]
};
Expand Down
11 changes: 1 addition & 10 deletions tests/dummy/config/targets.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
'use strict';

const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];

const isCI = !!process.env.CI;
const isProduction = process.env.EMBER_ENV === 'production';

if (isCI || isProduction) {
browsers.push('ie 11');
}

module.exports = {
browsers
browsers: ['last 1 Chrome versions']
};

0 comments on commit 83c0d77

Please sign in to comment.