-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #110 from empress/github-ci
move from travis to github ci
- Loading branch information
Showing
2 changed files
with
124 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- v[0-9]+.[0-9]+.[0-9]+ | ||
pull_request: | ||
|
||
env: | ||
NODE_VERSION: 10 | ||
|
||
jobs: | ||
lint: | ||
name: Tests and linting | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Check out a copy of the repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js ${{ env.NODE_VERSION }} | ||
uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Cache npm cache and node_modules | ||
id: cache-dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.npm | ||
node_modules | ||
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: ${{ runner.os }}-${{ env.NODE_VERSION }}- | ||
|
||
- name: global dependencies | ||
run: npm i -g npm@7 @lhci/cli@0.5.x | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
if: steps.cache-dependencies.outputs.cache-hit != 'true' | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
- name: Test | ||
run: npm run test:ember | ||
|
||
- name: Lighthouse CI | ||
run: npm run build && lhci autorun | ||
env: | ||
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} | ||
LHCI_TOKEN: ${{ secrets.LHCI_TOKEN }} | ||
|
||
|
||
test-addon-floating: | ||
name: Floating Dependencies | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Check out a copy of the repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js ${{ env.NODE_VERSION }} | ||
uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: update npm | ||
run: npm i -g npm@7 | ||
|
||
- name: Install dependencies | ||
run: npm install --no-package-lock | ||
|
||
- name: Test | ||
run: npm run test:ember | ||
|
||
test-compatibility: | ||
name: Test compatibility | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
scenario: | ||
- 'ember-lts-3.8' | ||
- 'ember-lts-3.12' | ||
- 'ember-lts-3.16' | ||
- 'ember-lts-3.20' | ||
- 'ember-release' | ||
- 'ember-beta' | ||
- 'ember-canary' | ||
- 'ember-default-with-jquery' | ||
- 'ember-classic' | ||
timeout-minutes: 7 | ||
steps: | ||
- name: Check out a copy of the repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js ${{ env.NODE_VERSION }} | ||
uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Cache npm cache and node_modules | ||
id: cache-dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.npm | ||
node_modules | ||
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-${{ matrix.scenario }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: ${{ runner.os }}-${{ env.NODE_VERSION }}-${{ matrix.scenario }}- | ||
|
||
- name: update npm | ||
run: npm i -g npm@7 | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
if: steps.cache-dependencies.outputs.cache-hit != 'true' | ||
|
||
- name: Test | ||
run: npx ember try:one ${{ matrix.scenario }} |
This file was deleted.
Oops, something went wrong.