From f051d88cf1866f837403c8d6d70932da0f68fb5a Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 28 Oct 2020 09:58:49 -0400 Subject: [PATCH] Swap to GitHub actions for CI. --- .github/workflows/ci.yml | 69 +++++++++++++++++++++++++++++++++++ .travis.yml | 77 ---------------------------------------- config/ember-try.js | 30 ++++++++++++++++ 3 files changed, 99 insertions(+), 77 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..49ac32dd --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,69 @@ +name: CI Build + +on: + push: + branches: [ master, 'v*' ] + pull_request: + branches: [ master ] + + +jobs: + test: + name: Tests + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: volta-cli/action@v1 + with: + node-version: 10.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: 10.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-default-with-jquery + - ember-default-with-mocha + - ember-classic + - embroider + - embroider-with-mocha + - embroider-optimized + - embroider-optimized-with-mocha + - ember-lts-3.20 + - ember-lts-3.16 + - ember-lts-3.12 + - ember-release + - ember-beta + - ember-canary + + 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/.travis.yml b/.travis.yml deleted file mode 100644 index e68b4b98..00000000 --- a/.travis.yml +++ /dev/null @@ -1,77 +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: xenial - -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: - - yarn lint - - yarn test:ember - - - stage: "Additional Tests" - name: "Floating Dependencies" - install: - - yarn install --no-lockfile --non-interactive - script: - - yarn test:ember - - # 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.12 - - env: EMBER_TRY_SCENARIO=ember-lts-3.16 - - env: EMBER_TRY_SCENARIO=ember-release - - env: EMBER_TRY_SCENARIO=ember-release TEST_FRAMEWORK=ember-mocha - - 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 - - env: EMBER_TRY_SCENARIO=embroider - - env: EMBER_TRY_SCENARIO=embroider TEST_FRAMEWORK=ember-mocha - - env: EMBER_TRY_SCENARIO=embroider-optimized - - env: EMBER_TRY_SCENARIO=embroider-optimized TEST_FRAMEWORK=ember-mocha - -before_install: - - curl -o- -L https://yarnpkg.com/install.sh | bash - - export PATH=$HOME/.yarn/bin:$PATH - -install: - - yarn install --non-interactive - -script: - - TEST_FRAMEWORK=$TEST_FRAMEWORK bin/install-test-framework.sh - - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO - -after_success: - - if [[ ($TRAVIS_BRANCH == master || -n $TRAVIS_TAG) && $EMBER_TRY_SCENARIO == ember-default ]]; then - node_modules/.bin/ember deploy production; - fi \ No newline at end of file diff --git a/config/ember-try.js b/config/ember-try.js index fb1f95f9..fa31e774 100644 --- a/config/ember-try.js +++ b/config/ember-try.js @@ -71,6 +71,14 @@ module.exports = async function() { } } }, + { + name: 'ember-default-with-mocha', + npm: { + devDependencies: { + 'ember-mocha': '*' + } + } + }, { name: 'ember-classic', env: { @@ -96,6 +104,17 @@ module.exports = async function() { }, }, }, + { + name: 'embroider-with-mocha', + npm: { + devDependencies: { + '@embroider/core': '*', + '@embroider/webpack': '*', + '@embroider/compat': '*', + 'ember-mocha': '*', + }, + }, + }, { name: 'embroider-optimized', npm: { @@ -105,6 +124,17 @@ module.exports = async function() { '@embroider/compat': '*', }, } + }, + { + name: 'embroider-optimized-with-mocha', + npm: { + devDependencies: { + '@embroider/core': '*', + '@embroider/webpack': '*', + '@embroider/compat': '*', + 'ember-mocha': '*', + }, + } } ] };