Skip to content

Set up CI in GitHub Actions #955

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 127 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: CI

# These trigger patterns based on https://github.com/broccolijs/broccoli/pull/436
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'
Comment on lines +15 to +17
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️


env:
CI: true

jobs:
commitlint:
name: Lint Commits
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout Code
uses: actions/checkout@v1
- name: Commitlint
uses: wagoid/commitlint-github-action@v1.2.2

test-locked-deps:
name: Test (linux, 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.12'
# https://github.com/expo/expo-github-action/issues/20#issuecomment-541676895
- name: Raise Watched File Limit
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Lint JS/TS Code
run: yarn lint:js
- name: Prepare CI Environment
run: yarn ci:prepare
- name: Ember App Tests
run: yarn ci:test:app
- name: Node Tests
run: yarn ci:test:node

test-windows:
name: Test (windows, locked dependencies)
runs-on: windows-latest
steps:
- name: Checkout Code
uses: actions/checkout@v1
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: '^8.12'
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Prepare CI Environment
run: yarn ci:prepare
- name: Ember App Tests
run: yarn ci:test:app
- name: Node Tests
run: yarn ci:test:node

test-floating:
name: Test (linux, floating dependencies)
runs-on: ubuntu-latest
needs: [test-locked-deps]
steps:
- name: Checkout Code
uses: actions/checkout@v1
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: '^8.12'
- name: Raise Watched File Limit
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Install Dependencies
run: yarn install --no-lockfile
- name: Prepare CI Environment
run: yarn ci:prepare
- name: Ember App Tests
run: yarn ci:test:app
- name: Node Tests
run: yarn ci:test:node

test-ts-cli-matrix:
name: Test
runs-on: ubuntu-latest
needs: [test-locked-deps]
strategy:
matrix:
deps:
- ember-cli@latest
- ember-cli@beta
- typescript@latest
- typescript@next
steps:
- name: Checkout Code
uses: actions/checkout@v1
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: '^8.12'
- name: Raise Watched File Limit
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Install Dependencies
run: yarn add --dev ${{ matrix.deps }}
- name: Prepare CI Environment
run: yarn ci:prepare
- name: Ember App Tests
run: yarn ci:test:app
- name: Node Tests
run: yarn ci:test:node

2 changes: 1 addition & 1 deletion ts/tests/acceptance/build-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
const { expect } = chai;

describe('Acceptance: build', function() {
this.timeout(30 * 1000);
this.timeout(60 * 1000);
let app: SkeletonApp;
beforeEach(function() {
app = new SkeletonApp();
Expand Down
Loading