diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml new file mode 100644 index 0000000..f083e39 --- /dev/null +++ b/.github/workflows/ci-build.yml @@ -0,0 +1,99 @@ +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 + - ember-lts-3.20 + - ember-lts-3.24 + - ember-lts-3.28 + # 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: + # not running Node.js 6 because of incompatibilities in transitive dependencies + 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 + + 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 diff --git a/config/ember-try.js b/config/ember-try.js index e7f892f..d021a6a 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', @@ -30,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: {