diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..ff2b2d3 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,60 @@ +name: CI + +on: + push: + branches: + - master + tags: + - '*' + pull_request: {} + schedule: + - cron: '0 6 * * 0' # weekly, on sundays + +jobs: + test: + name: Tests + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 8 + - name: install dependencies + run: npm ci + - name: lint js + run: npm run lint:js + - name: lint hbs + run: npm run lint:hbs + - name: test + run: npm test + + try-scenarios: + name: ember-try + + runs-on: ubuntu-latest + + needs: test + + strategy: + fail-fast: true + matrix: + ember-try-scenario: + - ember-lts-3.4 + - ember-lts-3.8 + - ember-release + - ember-beta + - ember-canary + - ember-default-with-jquery + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12 + - name: install dependencies + run: npm ci + - name: test + env: + EMBER_TRY_SCENARIO: ${{ matrix.ember-try-scenario }} + run: node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..9604b6b --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,34 @@ +name: Publish NPM Package + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12 + - name: install dependencies + run: npm ci + - name: test + run: npm test + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org/ + - name: install dependencies + run: npm ci + - name: publish + run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d69d020..0000000 --- a/.travis.yml +++ /dev/null @@ -1,64 +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 - - "8" - -sudo: false -dist: trusty - -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: - 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: - - npm run lint:hbs - - npm run lint:js - - npm 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-release - - env: EMBER_TRY_SCENARIO=ember-beta - - env: EMBER_TRY_SCENARIO=ember-canary - - env: EMBER_TRY_SCENARIO=ember-default-with-jquery - - - stage: deploy - script: skip - deploy: - provider: npm - email: jon.johnson@ucsf.edu - api_key: $NPM_TOKEN - on: - tags: true - -script: - - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO