diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 00000000..8b571b46 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,113 @@ +name: CI + +on: + pull_request: + push: + # filtering branches here prevents duplicate builds from pull_request and push + branches: + - master + - "v*" + # always run CI for tags + tags: + - "*" + +jobs: + lint: + name: "Linting" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: yarn install --frozen-lockfile --non-interactive + - run: yarn lint:js + + ember-tests: + needs: lint + name: "Tests: ubuntu (node@${{ matrix.node-version }})" + runs-on: ubuntu-latest + strategy: + matrix: + node-version: ["12"] + + steps: + - uses: actions/checkout@v2 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install --frozen-lockfile --non-interactive + - run: yarn test + + prefer-native-tests: + needs: ember-tests + name: "PREFER_NATIVE=true Tests: ubuntu (node@${{ matrix.node-version }})" + runs-on: ubuntu-latest + strategy: + matrix: + node-version: ["12"] + + steps: + - uses: actions/checkout@v2 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install --frozen-lockfile --non-interactive + - run: PREFER_NATIVE=true yarn test + + native-promise-tests: + needs: ember-tests + name: "NATIVE_PROMISE=true Tests: ubuntu (node@${{ matrix.node-version }})" + runs-on: ubuntu-latest + strategy: + matrix: + node-version: ["12"] + + steps: + - uses: actions/checkout@v2 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install --frozen-lockfile --non-interactive + - run: NATIVE_PROMISE=true yarn test + + node-tests: + needs: ember-tests + name: "Node Tests: ubuntu (node@${{ matrix.node-version }})" + runs-on: ubuntu-latest + strategy: + matrix: + node-version: ["12"] + + steps: + - uses: actions/checkout@v2 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install --frozen-lockfile --non-interactive + - run: yarn run test:node + + try-scenarios: + name: Tests - ${{ matrix.ember-try-scenario }} + timeout-minutes: 60 + runs-on: ubuntu-latest + continue-on-error: ${{ matrix.allow-failure }} + needs: ember-tests + + strategy: + fail-fast: true + matrix: + ember-try-scenario: + - ember-lts-3.4 + - ember-lts-3.8 + - ember-lts-3.12 + - ember-lts-3.16 + - ember-lts-3.20 + - ember-lts-3.24 + - ember-release + - ember-beta + allow-failure: [false] + include: + - ember-try-scenario: ember-canary + allow-failure: true + steps: + - uses: actions/checkout@v2 + with: + node-version: 12.x + - name: install dependencies + run: yarn install + - 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 5c4e110f..00000000 --- a/.travis.yml +++ /dev/null @@ -1,65 +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" - -addons: - chrome: stable - firefox: latest - -cache: - yarn: true - -env: - global: - # See https://git.io/vdao3 for details. - - JOBS=1 - -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" - install: - - yarn install --non-interactive - script: - - yarn lint:js - - yarn test - - PREFER_NATIVE=true yarn test - - NATIVE_PROMISE=true yarn test - - npm run test:node - - - name: "Floating Dependencies" - script: - - yarn 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-3.4 - - env: EMBER_TRY_SCENARIO=ember-lts-3.8 - - env: EMBER_TRY_SCENARIO=ember-lts-3.12 - - env: EMBER_TRY_SCENARIO=ember-lts-3.16 - - env: EMBER_TRY_SCENARIO=ember-lts-3.20 - - env: EMBER_TRY_SCENARIO=ember-lts-3.24 - - 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