From 44975bf1a28b610ffaee4073c0ff7f4afe1ce128 Mon Sep 17 00:00:00 2001 From: Alex LaFroscia Date: Fri, 20 Mar 2020 11:37:02 -0400 Subject: [PATCH 1/6] chore(ci): match Ember Data version in LTS tests --- config/ember-try.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/ember-try.js b/config/ember-try.js index fecde5f..683a25f 100644 --- a/config/ember-try.js +++ b/config/ember-try.js @@ -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' } } @@ -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' } } From 50d5297225332c941a4052fa863a873749d8e585 Mon Sep 17 00:00:00 2001 From: Alex LaFroscia Date: Fri, 20 Mar 2020 12:19:45 -0400 Subject: [PATCH 2/6] chore(ci): avoid dependency caching between jobs --- .github/workflows/verify.yml | 33 +++------------------------------ 1 file changed, 3 insertions(+), 30 deletions(-) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 4bdf156..f35653a 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -1,39 +1,17 @@ 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 - with: - path: node_modules - key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-node- - name: Install Dependencies run: yarn install - - lint: - needs: install - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: volta-cli/action@v1 - - name: Cache Dependencies - uses: actions/cache@v1 - with: - path: node_modules - key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-node- - name: Run ESLint run: yarn lint:js -f tap test: - needs: install runs-on: ubuntu-latest strategy: matrix: @@ -41,13 +19,8 @@ jobs: steps: - uses: actions/checkout@v1 - uses: volta-cli/action@v1 - - name: Cache Dependencies - uses: actions/cache@v1 - with: - path: node_modules - key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-node- + - name: Install Dependencies + run: yarn install - name: Run Tests run: yarn ember try:one ${{ matrix.ember-try-scenario }} env: From 3187ad64a48e7468fcea8485ee74b1d970017fab Mon Sep 17 00:00:00 2001 From: Alex LaFroscia Date: Fri, 20 Mar 2020 12:24:21 -0400 Subject: [PATCH 3/6] chore(ci): add recommended Yarn cache configuration --- .github/workflows/verify.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index f35653a..7167973 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -6,6 +6,16 @@ jobs: steps: - uses: actions/checkout@v1 - uses: volta-cli/action@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: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- - name: Install Dependencies run: yarn install - name: Run ESLint @@ -19,6 +29,16 @@ jobs: steps: - uses: actions/checkout@v1 - uses: volta-cli/action@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: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- - name: Install Dependencies run: yarn install - name: Run Tests From 00406b81baab025f55faea71101b07bddb5cfd65 Mon Sep 17 00:00:00 2001 From: Alex LaFroscia Date: Fri, 20 Mar 2020 12:34:12 -0400 Subject: [PATCH 4/6] chore(ci): run default scenario without ember-try --- .github/workflows/verify.yml | 27 +++++++++++++++++++++++++-- config/ember-try.js | 25 ------------------------- 2 files changed, 25 insertions(+), 27 deletions(-) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 7167973..15d4287 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -22,10 +22,33 @@ jobs: run: yarn lint:js -f tap test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: volta-cli/action@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: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: Install Dependencies + run: yarn install + - name: Run Tests + run: yarn test + env: + CI: true + + 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 @@ -42,7 +65,7 @@ jobs: - name: Install Dependencies run: yarn install - name: Run Tests - run: yarn ember try:one ${{ matrix.ember-try-scenario }} + run: yarn ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup=true env: CI: true diff --git a/config/ember-try.js b/config/ember-try.js index 683a25f..cf4cb51 100644 --- a/config/ember-try.js +++ b/config/ember-try.js @@ -47,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' - } - } } ] }; From cf3a7d203592db47bc8ca724c78e945fa5a06ed9 Mon Sep 17 00:00:00 2001 From: Alex LaFroscia Date: Fri, 20 Mar 2020 15:15:30 -0400 Subject: [PATCH 5/6] chore(ci): generate artifacts for `ember-try` scenarios --- .github/workflows/verify.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 15d4287..19141c2 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -64,9 +64,16 @@ jobs: ${{ 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 }} --skip-cleanup=true + run: yarn ember test --path ./dist env: CI: true - - From e1d1e72b23509228ead3c56156a7759208a09ee8 Mon Sep 17 00:00:00 2001 From: Alex LaFroscia Date: Fri, 20 Mar 2020 16:00:15 -0400 Subject: [PATCH 6/6] chore(ci): target only chrome in build --- tests/dummy/config/targets.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/tests/dummy/config/targets.js b/tests/dummy/config/targets.js index 846c718..d5a8cf8 100644 --- a/tests/dummy/config/targets.js +++ b/tests/dummy/config/targets.js @@ -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'] };