diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..f742868d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,78 @@ +name: CI + +on: + push: + branches: + - main + - master + - 'v*' + pull_request: + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2.4.0 + with: + # necessary for commitlint-github-action + fetch-depth: 0 + + - uses: actions/setup-node@v2.4.1 + with: + node-version: '6' + cache: yarn + + - run: yarn install --frozen-lockfile + - run: yarn lint:js + - uses: wagoid/commitlint-github-action@v4 + - run: yarn ember ts:precompile + + test: + name: Tests + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2.4.0 + - uses: actions/setup-node@v2.4.1 + with: + node-version: '6' + cache: yarn + + - run: yarn install --frozen-lockfile + - run: yarn test + + try-scenarios: + name: ember-try + runs-on: ubuntu-latest + needs: [lint, test] + + strategy: + fail-fast: false + matrix: + ember-try-scenario: + - ember-lts-2.12 + - ember-lts-2.16 + - ember-lts-2.18 + - ember-lts-3.4 + - ember-lts-3.8 + # disabled because the Ember.js 4 scenarios are not passing yet + # - ember-release + # - ember-beta + # - ember-canary + # disabled for now because it fails with a strange ember-data + # installation error + #- fastboot-addon-tests + + steps: + - uses: actions/checkout@v2.4.0 + - uses: actions/setup-node@v2.4.1 + with: + # some of the unlocked dependency versions that ember-try installs + # are incompatible with Node.js 6 + node-version: '10' + cache: yarn + + - run: yarn install --frozen-lockfile + - run: node_modules/.bin/ember try:one ${{ matrix.ember-try-scenario }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bea47f9f..00000000 --- a/.travis.yml +++ /dev/null @@ -1,57 +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 - directories: - - $HOME/.npm - -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.12 - - EMBER_TRY_SCENARIO=ember-lts-2.16 - - EMBER_TRY_SCENARIO=ember-lts-2.18 - - EMBER_TRY_SCENARIO=ember-lts-3.4 - - EMBER_TRY_SCENARIO=ember-lts-3.8 - - EMBER_TRY_SCENARIO=ember-release - - EMBER_TRY_SCENARIO=ember-beta - - EMBER_TRY_SCENARIO=ember-canary - - EMBER_TRY_SCENARIO=fastboot-addon-tests - -matrix: - fast_finish: true - allow_failures: - - env: EMBER_TRY_SCENARIO=ember-canary - -stages: - - lint - - test - -jobs: - include: - - stage: lint - script: yarn lint:js - - stage: lint - script: yarn commitlint-travis - - stage: lint - script: yarn ember ts:precompile - -script: - # 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 diff --git a/package.json b/package.json index 006d99b1..413ba9e8 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,6 @@ "devDependencies": { "@commitlint/cli": "^7.0.0", "@commitlint/config-conventional": "^7.0.1", - "@commitlint/travis-cli": "^7.0.0", "@types/chai": "^4.1.4", "@types/ember": "^3.0.24", "@types/ember-data": "^3.1.1", @@ -74,7 +73,7 @@ "ember-cli-testdouble": "^0.1.3", "ember-cli-typescript": "^1.4.3", "ember-cli-uglify": "^2.1.0", - "ember-data": "^3.1.1", + "ember-data": "~3.1.1", "ember-export-application-global": "2.0.0", "ember-fastboot-addon-tests": "^0.4.0", "ember-load-initializers": "1.1.0", diff --git a/yarn.lock b/yarn.lock index 61988596..132bcfab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -754,15 +754,6 @@ dependencies: find-up "^2.1.0" -"@commitlint/travis-cli@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/travis-cli/-/travis-cli-7.0.0.tgz#2d8698310b65908973ec1c5e66b15164bd43f5ea" - integrity sha1-LYaYMQtlkIlz7BxeZrFRZL1D9eo= - dependencies: - "@commitlint/cli" "^7.0.0" - babel-runtime "6.26.0" - execa "0.9.0" - "@ember/ordered-set@^1.0.0": version "1.0.1" resolved "https://registry.yarnpkg.com/@ember/ordered-set/-/ordered-set-1.0.1.tgz#f1a8c731168fb0ce25f868118ffef266ace29bac" @@ -4621,10 +4612,10 @@ ember-compatibility-helpers@^1.0.0: ember-cli-version-checker "^2.1.1" semver "^5.4.1" -ember-data@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/ember-data/-/ember-data-3.1.1.tgz#8c17c97a4932b0a0a405cc3e38c43140880366d2" - integrity sha512-fEoD80XZtu3U/iebFCNnqy+w0X9SD7oAtTJdLISlHJp872FfKV3UurdD098AJoGfDHy6FCZvCwjq0m4ZS+v+bw== +ember-data@~3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/ember-data/-/ember-data-3.1.2.tgz#10525e7d3ea52919596b335bdd68f3802de7cda3" + integrity sha512-tVD+tnimzJ0CliNNmJRHOzXRaBVqRjrkH9EZUEG7obbCWwOZCQz2NKOlIxbxIoAJmDXMCWRGpqGsYQhDHTz8og== dependencies: "@ember/ordered-set" "^1.0.0" amd-name-resolver "0.0.7" @@ -5192,10 +5183,10 @@ exec-sh@^0.2.0: dependencies: merge "^1.1.3" -execa@0.9.0, execa@^0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.9.0.tgz#adb7ce62cf985071f60580deb4a88b9e34712d01" - integrity sha512-BbUMBiX4hqiHZUA5+JujIjNb6TyAlp2D5KLheMjMluwOuzcnylDL4AxZYLLn1n2AGB49eSWwyKvvEQoRpnAtmA== +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= dependencies: cross-spawn "^5.0.1" get-stream "^3.0.0" @@ -5205,10 +5196,10 @@ execa@0.9.0, execa@^0.9.0: signal-exit "^3.0.0" strip-eof "^1.0.0" -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= +execa@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.9.0.tgz#adb7ce62cf985071f60580deb4a88b9e34712d01" + integrity sha512-BbUMBiX4hqiHZUA5+JujIjNb6TyAlp2D5KLheMjMluwOuzcnylDL4AxZYLLn1n2AGB49eSWwyKvvEQoRpnAtmA== dependencies: cross-spawn "^5.0.1" get-stream "^3.0.0"