diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9d540b1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,75 @@ +name: CI + +on: + push: + branches: + - master + pull_request: {} + +jobs: + + lint: + name: "Lint" + env: + CI: true + runs-on: ubuntu-latest + strategy: + fail-fast: true + steps: + - uses: actions/checkout@v2 + - name: Install node + uses: actions/setup-node@v2-beta + with: + node-version: 12.x + + - name: Get yarn cache + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + + - uses: actions/cache@v2 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: yarn install + run: yarn + - name: lint + run: yarn lint:js + + floating: + name: "Floating dependencies" + env: + CI: true + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + try-scenario: [ + ember-lts-3.16, + ember-lts-3.20, + ember-release, + ember-beta, + ] + steps: + - uses: actions/checkout@v2 + - name: Install node + uses: actions/setup-node@v2-beta + with: + node-version: 12.x + + - name: Get yarn cache + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + + - uses: actions/cache@v2 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: yarn install + run: yarn + - name: test + run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f3ba67e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,52 +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" - -sudo: false -dist: xenial - -addons: - chrome: stable - code_climate: - repo_token: d0c0b77e8e686f0574c52fea34c6b2d7accf687c6946c5862ad9bfd727b9e999 - -cache: - yarn: true - -env: - global: - # See https://git.io/vdao3 for details. - - JOBS=1 - matrix: - # we recommend new addons test the current and previous LTS - # as well as latest stable release (bonus points to beta/canary) - - EMBER_TRY_SCENARIO=ember-lts-2.18 - - EMBER_TRY_SCENARIO=ember-release - - EMBER_TRY_SCENARIO=ember-beta - - EMBER_TRY_SCENARIO=ember-canary - - EMBER_TRY_SCENARIO=ember-default - -matrix: - fast_finish: true - allow_failures: - - env: EMBER_TRY_SCENARIO=ember-canary - - env: EMBER_TRY_SCENARIO=ember-beta - -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: - - yarn lint:js - # Usually, it's ok to finish the test scenario without reverting - # to the addon's original dependency state, skipping "cleanup". - - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup - -after_script: - - codeclimate-test-reporter < coverage/lcov.info diff --git a/config/ember-try.js b/config/ember-try.js index dd52ba0..ef779e9 100644 --- a/config/ember-try.js +++ b/config/ember-try.js @@ -2,10 +2,18 @@ module.exports = { useYarn: true, scenarios: [ { - name: 'ember-lts-2.18', + name: 'ember-lts-3.16', npm: { devDependencies: { - 'ember-source': '~2.18.0' + 'ember-source': '~3.16.0' + } + } + }, + { + name: 'ember-lts-3.20', + npm: { + devDependencies: { + 'ember-source': '~3.20.0' } } }, diff --git a/package.json b/package.json index ef9d50d..71c459c 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "build": "ember build", "lint:js": "eslint ./*.js addon addon-test-support app config lib server test-support tests", "start": "ember serve", - "test": "ember try:each" + "test": "ember test" }, "dependencies": { "ember-cli-babel": "^6.9.2",