From c8cb5be6304d269f95cdfae3e81cf4c13b3773f5 Mon Sep 17 00:00:00 2001 From: simonihmig Date: Sat, 9 Jan 2021 01:35:02 +0100 Subject: [PATCH] Setup Github Actions --- .github/workflows/ci.yml | 117 +++++++++++++++++++++++++++++++++++++++ .travis.yml | 63 --------------------- 2 files changed, 117 insertions(+), 63 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 0000000..0d539b6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,117 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + +env: + NODE_VERSION: '10.x' + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - uses: actions/setup-node@v2-beta + with: + node-version: '${{ env.NODE_VERSION }}' + + - name: Install dependencies + uses: bahmutov/npm-install@v1 + + - name: Lint + run: yarn lint + + test: + name: Tests + runs-on: ${{ matrix.os }} + needs: lint + + strategy: + matrix: + os: [ubuntu-latest] + browser: [chrome] + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - uses: actions/setup-node@v2-beta + with: + node-version: '${{ env.NODE_VERSION }}' + + - name: Install dependencies + uses: bahmutov/npm-install@v1 + + - name: Test Ember + run: yarn test:ember --launch ${{ matrix.browser }} + + + floating-dependencies: + name: Floating Dependencies + runs-on: ${{ matrix.os }} + needs: lint + + strategy: + matrix: + os: [ubuntu-latest] + browser: [chrome] + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - uses: actions/setup-node@v2-beta + with: + node-version: '${{ env.NODE_VERSION }}' + + - name: Install dependencies + uses: bahmutov/npm-install@v1 + with: + useLockFile: false + + - name: Test + run: yarn test:ember --launch ${{ matrix.browser }} + + + try-scenarios: + name: Tests - ${{ matrix.ember-try-scenario }} + runs-on: ubuntu-latest + continue-on-error: ${{ matrix.allow-failure }} + needs: test + + strategy: + fail-fast: false + matrix: + ember-try-scenario: + - ember-lts-3.16 + - ember-release + - ember-beta + - ember-default-with-jquery + allow-failure: [false] + include: + - ember-try-scenario: ember-canary + allow-failure: true + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - uses: actions/setup-node@v2-beta + with: + node-version: '${{ env.NODE_VERSION }}' + + - name: Install dependencies + uses: bahmutov/npm-install@v1 + + - name: Setup scenario dependencies + run: yarn ember try:one ${{ matrix.ember-try-scenario }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 54dbfd9..0000000 --- a/.travis.yml +++ /dev/null @@ -1,63 +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: - directories: - - $HOME/.npm - -env: - global: - # See https://git.io/vdao3 for details. - - JOBS=1 - -branches: - only: - - master - # npm version tags - - /^v\d+\.\d+\.\d+/ - -jobs: - fast_finish: 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.16 - - env: EMBER_TRY_SCENARIO=ember-lts-3.20 - - 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 - - env: EMBER_TRY_SCENARIO=ember-classic - -before_install: - - curl -o- -L https://yarnpkg.com/install.sh | bash - - export PATH=$HOME/.yarn/bin:$PATH - -script: - - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO