Skip to content

Commit 00a537a

Browse files
committed
Add github workflow ci
1 parent 1d8ca6b commit 00a537a

File tree

1 file changed

+114
-0
lines changed

1 file changed

+114
-0
lines changed

.github/workflows/ci.yml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request: {}
8+
schedule:
9+
- cron: '0 3 * * *' # daily, at 3am
10+
11+
jobs:
12+
test:
13+
name: Tests
14+
15+
runs-on: ${{ matrix.os }}
16+
17+
strategy:
18+
matrix:
19+
os: [ubuntu-latest, macos-latest, windows-latest]
20+
21+
steps:
22+
- if: matrix.os == 'macos-latest'
23+
run: |
24+
brew update
25+
brew cask install google-chrome
26+
- uses: actions/checkout@v1
27+
- uses: actions/setup-node@v1
28+
with:
29+
node-version: 8.x
30+
- name: get yarn cache dir
31+
id: yarn-cache
32+
run: echo "::set-output name=dir::$(yarn cache dir)"
33+
- uses: actions/cache@v1
34+
with:
35+
path: ${{ steps.yarn-cache.outputs.dir }}
36+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
37+
restore-keys: |
38+
${{ runner.os }}-yarn-
39+
- name: install dependencies
40+
run: yarn install --frozen-lockfile --ignore-engines
41+
- name: lint
42+
if: matrix.os != 'windows-latest'
43+
run: yarn lint:js
44+
- name: test
45+
run: yarn test
46+
- name: node-test
47+
run: yarn test:node
48+
49+
floating-dependencies:
50+
name: Floating Dependencies
51+
52+
runs-on: ubuntu-latest
53+
54+
needs: test
55+
56+
steps:
57+
- uses: actions/checkout@v1
58+
- uses: actions/setup-node@v1
59+
with:
60+
node-version: 8.x
61+
- name: get yarn cache dir
62+
id: yarn-cache
63+
run: echo "::set-output name=dir::$(yarn cache dir)"
64+
- uses: actions/cache@v1
65+
with:
66+
path: ${{ steps.yarn-cache.outputs.dir }}
67+
key: ${{ runner.os }}-yarn-floating-dependencies-${{ hashFiles('**/yarn.lock') }}
68+
restore-keys: |
69+
${{ runner.os }}-yarn-
70+
- name: install dependencies
71+
run: yarn install --no-lockfile
72+
- run: yarn test
73+
74+
ember-try-scenarios:
75+
name: ${{ matrix.ember-try-scenario }}
76+
77+
runs-on: ubuntu-latest
78+
79+
needs: [test, floating-dependencies]
80+
81+
strategy:
82+
fail-fast: true
83+
matrix:
84+
ember-try-scenario:
85+
- ember-lts-3.4
86+
- ember-lts-3.8
87+
- ember-lts-3.12
88+
- ember-release
89+
- ember-beta
90+
- ember-canary
91+
- ember-default
92+
- ember-default-with-jquery
93+
94+
steps:
95+
- uses: actions/checkout@v1
96+
- uses: actions/setup-node@v1
97+
with:
98+
node-version: 8.x
99+
- name: get yarn cache dir
100+
id: yarn-cache
101+
run: echo "::set-output name=dir::$(yarn cache dir)"
102+
- uses: actions/cache@v1
103+
with:
104+
path: ${{ steps.yarn-cache.outputs.dir }}
105+
key: ${{ runner.os }}-yarn-try-scenarios-${{ matrix.ember-try-scenario }}-${{ hashFiles('**/yarn.lock') }}
106+
restore-keys: |
107+
${{ runner.os }}-yarn-
108+
- name: install dependencies
109+
run: yarn install
110+
- name: test
111+
env:
112+
EMBER_TRY_SCENARIO: ${{ matrix.ember-try-scenario }}
113+
run: node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO
114+

0 commit comments

Comments
 (0)