From 3b64c07fe2925e3f8b0b070d4ead7d4a60a0eba7 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Mon, 13 Dec 2021 21:18:19 +0100 Subject: [PATCH 1/3] Backport TravisCI to GitHub Actions migration --- .github/workflows/ci-build.yml | 95 ++++++++++++++++++++++++++++++++++ .travis.yml | 61 ---------------------- 2 files changed, 95 insertions(+), 61 deletions(-) create mode 100644 .github/workflows/ci-build.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml new file mode 100644 index 0000000..94b3007 --- /dev/null +++ b/.github/workflows/ci-build.yml @@ -0,0 +1,95 @@ +name: CI Build + +on: + push: + branches: + - main + - master + - v* + tags: + - v* + pull_request: + +jobs: + test: + name: Tests + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 6.x + + - run: yarn install --frozen-lockfile + - run: yarn lint:hbs + - run: yarn lint:js + - run: yarn test + + floating-dependencies: + name: "Floating Dependencies" + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + # not running Node.js 6 because of incompatibilities in transitive dependencies + node-version: 12.x + + - run: yarn install --no-lockfile --ignore-engines + - run: yarn test + + try-scenarios: + name: "Try: ${{ matrix.ember-try-scenario }}" + + runs-on: ubuntu-latest + + needs: test + + strategy: + matrix: + ember-try-scenario: + - ember-lts-2.18 + - ember-lts-3.4 + # disabled due to incompatibility with Ember.js 4 + # - ember-release + # - ember-beta + # - ember-canary + - ember-default-with-jquery + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 6.x + + - name: install dependencies + run: yarn install --frozen-lockfile + - name: test + run: node_modules/.bin/ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup + + publish: + name: Publish to npm + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install node + uses: actions/setup-node@v2 + with: + node-version: 14.x + registry-url: 'https://registry.npmjs.org' + + - name: install dependencies + run: yarn install --frozen-lockfile + + - name: auto-dist-tag + run: npx auto-dist-tag@1 --write + + - name: publish to npm + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 388f083..0000000 --- a/.travis.yml +++ /dev/null @@ -1,61 +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 - - "6" - -sudo: false -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: - fail_fast: true - allow_failures: - - env: EMBER_TRY_SCENARIO=ember-canary - - include: - # runs linting and tests with current locked deps - - - stage: "Tests" - name: "Tests" - script: - - npm run lint:hbs - - npm run lint:js - - npm test - - # we recommend new addons test the current and previous LTS - # as well as latest stable release (bonus points to beta/canary) - - stage: "Additional Tests" - env: EMBER_TRY_SCENARIO=ember-lts-2.18 - - env: EMBER_TRY_SCENARIO=ember-lts-3.4 - - 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 - -before_install: - - curl -o- -L https://yarnpkg.com/install.sh | bash - - export PATH=$HOME/.yarn/bin:$PATH - -install: - - yarn install --no-lockfile --non-interactive - -script: - - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO From 080bad4bc920fa2b3b0a442b015483494855a290 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Mon, 13 Dec 2021 21:40:57 +0100 Subject: [PATCH 2/3] ember-try: Enable `useYarn` option --- config/ember-try.js | 1 + 1 file changed, 1 insertion(+) diff --git a/config/ember-try.js b/config/ember-try.js index e7f892f..0d3d4b9 100644 --- a/config/ember-try.js +++ b/config/ember-try.js @@ -9,6 +9,7 @@ module.exports = function() { getChannelURL('canary') ]).then((urls) => { return { + useYarn: true, scenarios: [ { name: 'ember-lts-2.18', From 4e15b3d68e7e4e8dfb7e92b1c6f80896f464b8a4 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Mon, 13 Dec 2021 21:32:31 +0100 Subject: [PATCH 3/3] ember-try: Add Ember.js 3.20, 3.24 and 3.28 scenarios --- .github/workflows/ci-build.yml | 6 +++++- config/ember-try.js | 24 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 94b3007..f083e39 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -52,6 +52,9 @@ jobs: ember-try-scenario: - ember-lts-2.18 - ember-lts-3.4 + - ember-lts-3.20 + - ember-lts-3.24 + - ember-lts-3.28 # disabled due to incompatibility with Ember.js 4 # - ember-release # - ember-beta @@ -62,7 +65,8 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: - node-version: 6.x + # not running Node.js 6 because of incompatibilities in transitive dependencies + node-version: 12.x - name: install dependencies run: yarn install --frozen-lockfile diff --git a/config/ember-try.js b/config/ember-try.js index 0d3d4b9..d021a6a 100644 --- a/config/ember-try.js +++ b/config/ember-try.js @@ -31,6 +31,30 @@ module.exports = function() { } } }, + { + name: 'ember-lts-3.20', + npm: { + devDependencies: { + 'ember-source': '~3.20.0' + } + } + }, + { + name: 'ember-lts-3.24', + npm: { + devDependencies: { + 'ember-source': '~3.24.0' + } + } + }, + { + name: 'ember-lts-3.28', + npm: { + devDependencies: { + 'ember-source': '~3.28.0' + } + } + }, { name: 'ember-release', npm: {