-
Notifications
You must be signed in to change notification settings - Fork 5
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 #375 from alexdiliberto/github-actions
Github Actions
- Loading branch information
Showing
1 changed file
with
126 additions
and
0 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,126 @@ | ||
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: | ||
- '*' | ||
# early issue detection: run CI weekly on Sundays | ||
schedule: | ||
- cron: '0 6 * * 0' | ||
|
||
env: | ||
CI: true | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v1 | ||
- name: Install Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 8 | ||
- name: Install Dependencies | ||
run: yarn install --non-interactive | ||
- name: Lint HBS | ||
run: yarn lint:hbs | ||
- name: Lint JS | ||
run: yarn lint:js | ||
|
||
test-locked-deps: | ||
name: Locked Dependencies | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v1 | ||
- name: Install Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 8 | ||
- name: Install Dependencies | ||
run: yarn install --non-interactive | ||
- name: Browser Tests | ||
run: yarn test | ||
|
||
test-floating-deps: | ||
name: Floating Dependencies | ||
runs-on: ubuntu-latest | ||
needs: [lint, test-locked-deps] | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v1 | ||
- name: Install Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 8 | ||
- name: Install Dependencies without Lockfile | ||
run: yarn install --no-lockfile --non-interactive | ||
- name: Browser Tests | ||
run: yarn test | ||
|
||
test-ember-try: | ||
name: Ember Try | ||
runs-on: ubuntu-latest | ||
needs: [lint, test-locked-deps] | ||
strategy: | ||
matrix: | ||
scenario: | ||
- ember-3.13 | ||
- ember-release | ||
- ember-beta | ||
- ember-canary | ||
- ember-default-with-jquery | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v1 | ||
- name: Install Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 8 | ||
- name: Install Dependencies | ||
run: yarn install --no-lockfile --non-interactive | ||
- name: "Scenario: ${{ matrix.scenario }}" | ||
run: yarn ember try:one ${{ matrix.scenario }} | ||
|
||
deploy-prod: | ||
name: Production Deploy | ||
runs-on: ubuntu-latest | ||
needs: [test-floating-deps, test-ember-try] | ||
# if: (branch = master OR tag IS present) AND type = push | ||
if: github.ref == 'master' && github.event_name == 'push' | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v1 | ||
- name: Install Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 8 | ||
- name: Install Dependencies | ||
run: yarn install --no-lockfile --non-interactive | ||
- name: Deploy | ||
run: yarn ember deploy production | ||
|
||
# publish-npm: | ||
# name: NPM Publish | ||
# runs-on: ubuntu-latest | ||
# needs: [deploy-prod] | ||
# steps: | ||
# - name: Checkout Code | ||
# uses: actions/checkout@v1 | ||
# - name: Install Node | ||
# uses: actions/setup-node@v1 | ||
# with: | ||
# node-version: 8 | ||
# registry-url: https://registry.npmjs.org/ | ||
# - name: Publish | ||
# run: npm publish --dry-run | ||
# env: | ||
# NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} |