From c486625718709e475b77560953dd9364f9c94c98 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 26 Feb 2021 23:58:56 -0500 Subject: [PATCH 1/2] Migrate to GH Actions. --- .github/workflows/ci.yml | 228 +++++++++++++++++++++++++++++++++++++++ .travis.yml | 63 ----------- 2 files changed, 228 insertions(+), 63 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..098b947 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,228 @@ +# 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: ember-lts-3.16 +#$ allowedToFail: false +#$ - scenario: ember-lts-3.20 +#$ allowedToFail: false +#$ - scenario: ember-release +#$ allowedToFail: false +#$ - scenario: ember-beta +#$ allowedToFail: false +#$ - scenario: ember-canary +#$ allowedToFail: true +#$ - scenario: ember-default-with-jquery +#$ allowedToFail: false +#$ - scenario: ember-classic +#$ allowedToFail: false +#$ nodeVersion: 10.x +#$ packageManager: yarn +# + +name: CI + +on: + push: + branches: + - master + pull_request: + +env: + NODE_VERSION: '10.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: ${{ matrix.allow-failure }} + needs: test + + strategy: + fail-fast: true + matrix: + ember-try-scenario: [ + ember-lts-3.16, + ember-lts-3.20, + ember-release, + ember-beta, + ember-default-with-jquery, + ember-classic + ] + allow-failure: [false] + include: + - ember-try-scenario: ember-canary + allow-failure: true + + 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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9f963d2..0000000 --- a/.travis.yml +++ /dev/null @@ -1,63 +0,0 @@ ---- -language: node_js -node_js: - # we recommend testing addons with the same minimum supported node version as Ember CLI - # so that your addon works for all apps - - "10" - -dist: xenial - -addons: - chrome: stable - -cache: - yarn: true - -env: - global: - # See https://git.io/vdao3 for details. - - JOBS=1 - -branches: - only: - - master - # npm version tags - - /^v\d+\.\d+\.\d+/ - -jobs: - fast_finish: true - allow_failures: - - env: EMBER_TRY_SCENARIO=ember-canary - - include: - # runs linting and tests with current locked deps - - stage: "Tests" - name: "Tests" - script: - - yarn lint - - yarn test:ember - - - stage: "Additional Tests" - name: "Floating Dependencies" - install: - - yarn install --no-lockfile --non-interactive - script: - - yarn test:ember - - - # we recommend new addons test the current and previous LTS - # as well as latest stable release (bonus points to beta/canary) - - env: EMBER_TRY_SCENARIO=ember-lts-3.16 - - env: EMBER_TRY_SCENARIO=ember-lts-3.20 - - env: EMBER_TRY_SCENARIO=ember-release - - env: EMBER_TRY_SCENARIO=ember-beta - - env: EMBER_TRY_SCENARIO=ember-canary - - env: EMBER_TRY_SCENARIO=ember-default-with-jquery - - env: EMBER_TRY_SCENARIO=ember-classic - -before_install: - - curl -o- -L https://yarnpkg.com/install.sh | bash - - export PATH=$HOME/.yarn/bin:$PATH - -script: - - yarn ember try:one $EMBER_TRY_SCENARIO From e588d2660ad13a2eee9fa42e91b4fb5508773fc2 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sat, 27 Feb 2021 00:01:10 -0500 Subject: [PATCH 2/2] yarn lint:fix --- tests/helpers/debug-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/helpers/debug-test.js b/tests/helpers/debug-test.js index 2ecdda3..9e5e254 100644 --- a/tests/helpers/debug-test.js +++ b/tests/helpers/debug-test.js @@ -1,4 +1,4 @@ -import { DEBUG } from '@glimmer/env' +import { DEBUG } from '@glimmer/env'; import { test } from 'qunit'; export default function debugTest(description, callback) {