From 37a541087eda6966473322cd6822a0aaec07eb3a Mon Sep 17 00:00:00 2001 From: Robert Wagner Date: Fri, 6 Aug 2021 00:38:52 -0400 Subject: [PATCH 1/2] Use GitHub Actions instead of Travis --- .travis.yml | 65 -------------------------------- addon/.github/workflows/main.yml | 64 +++++++++++++++++++++++++++++++ config/ember-try.js | 22 +++++------ 3 files changed, 74 insertions(+), 77 deletions(-) delete mode 100644 .travis.yml create mode 100644 addon/.github/workflows/main.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d74b5c00..00000000 --- a/.travis.yml +++ /dev/null @@ -1,65 +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: trusty - -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:hbs - - yarn lint:js - - yarn test - - - stage: "Additional Tests" - name: "Floating Dependencies" - install: - - yarn install --no-lockfile --non-interactive - script: - - yarn test - - # 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-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 - -install: - - yarn install --non-interactive - -script: - - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO diff --git a/addon/.github/workflows/main.yml b/addon/.github/workflows/main.yml new file mode 100644 index 00000000..d10d0317 --- /dev/null +++ b/addon/.github/workflows/main.yml @@ -0,0 +1,64 @@ +name: CI Build + +on: + pull_request: {} + push: + branches: + - master + tags: + - v* + +jobs: + test: + name: Tests + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: volta-cli/action@v1 + with: + node-version: 12.x + - run: yarn install --frozen-lockfile + - run: yarn lint + - run: yarn test:ember + + floating-dependencies: + name: 'Floating Dependencies' + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: volta-cli/action@v1 + with: + node-version: 12.x + - run: yarn install --no-lockfile + - run: yarn test:ember + + try-scenarios: + name: 'Try: ${{ matrix.ember-try-scenario }}' + + runs-on: ubuntu-latest + + needs: test + + strategy: + fail-fast: false + matrix: + ember-try-scenario: + - ember-lts-3.16 + - ember-lts-3.20 + - ember-release + - ember-beta + - ember-canary + - ember-default-with-jquery + - ember-classic + + steps: + - uses: actions/checkout@v2 + - uses: volta-cli/action@v1 + with: + node-version: 12.x + - name: install dependencies + run: yarn install --frozen-lockfile + - name: test + run: node_modules/.bin/ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup diff --git a/config/ember-try.js b/config/ember-try.js index 0eeccf01..d2964ce2 100644 --- a/config/ember-try.js +++ b/config/ember-try.js @@ -2,7 +2,7 @@ const getChannelURL = require('ember-source-channel-url'); -module.exports = async function() { +module.exports = async function () { return { useYarn: true, scenarios: [ @@ -14,6 +14,14 @@ module.exports = async function() { } } }, + { + name: 'ember-lts-3.20', + npm: { + devDependencies: { + 'ember-source': '~3.20.5' + } + } + }, { name: 'ember-release', npm: { @@ -38,16 +46,6 @@ module.exports = async function() { } } }, - // 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-default-with-jquery', env: { @@ -57,7 +55,7 @@ module.exports = async function() { }, npm: { devDependencies: { - '@ember/jquery': '^0.5.1' + '@ember/jquery': '^1.1.0' } } }, From e4a0116b2ccd79f8fd33e708e9ff307732f63b86 Mon Sep 17 00:00:00 2001 From: Robert Wagner Date: Fri, 6 Aug 2021 00:41:42 -0400 Subject: [PATCH 2/2] Move dir --- {addon/.github => .github}/workflows/main.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {addon/.github => .github}/workflows/main.yml (100%) diff --git a/addon/.github/workflows/main.yml b/.github/workflows/main.yml similarity index 100% rename from addon/.github/workflows/main.yml rename to .github/workflows/main.yml