Skip to content

Commit 1d5bb8f

Browse files
authored
Adding github action tests (#769)
1 parent db47968 commit 1d5bb8f

File tree

3 files changed

+1847
-1514
lines changed

3 files changed

+1847
-1514
lines changed

.github/workflows/ci.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
# Filtering branches here prevents duplicate builds from pull_request and push
7+
branches:
8+
- master
9+
- beta
10+
- 'v*'
11+
- /^greenkeeper.*$/
12+
13+
# Always run CI for tags
14+
tags:
15+
- '*'
16+
17+
# Early issue detection: run CI weekly on Sundays
18+
schedule:
19+
- cron: '0 6 * * 0'
20+
21+
jobs:
22+
test-mocha:
23+
name: Mocha Tests - ${{ matrix.node-version }}
24+
runs-on: ubuntu-latest
25+
26+
strategy:
27+
matrix:
28+
node-version: [12.x, 10.x]
29+
30+
steps:
31+
- name: Checkout Code
32+
uses: actions/checkout@v2
33+
- name: Use Node.js ${{ matrix.node-version }}
34+
uses: actions/setup-node@v1
35+
with:
36+
node-version: ${{ matrix.node-version }}
37+
- name: Install NPM version 4
38+
run: |
39+
npm config set spin false
40+
npm install -g npm@4
41+
- name: Yarn Install
42+
run: yarn install --ignore-engines
43+
- name: Run Mocha Tests
44+
run: yarn test:mocha
45+
46+
test-ember:
47+
name: Ember Tests
48+
runs-on: ${{ matrix.os }}
49+
50+
strategy:
51+
matrix:
52+
node-version: [12.x, 10.x]
53+
os: [ubuntu-latest, windows-latest]
54+
55+
steps:
56+
- name: Checkout Code
57+
uses: actions/checkout@v2
58+
- name: Use Node.js ${{ matrix.node-version }}
59+
uses: actions/setup-node@v1
60+
with:
61+
node-version: ${{ matrix.node-version }}
62+
- name: Yarn Install
63+
run: yarn install --ignore-engines
64+
- name: Run Tests
65+
run: yarn test:ember
66+

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
"release": "release-it",
1919
"start": "ember serve",
2020
"test": "mocha && ember test",
21+
"test:mocha": "mocha",
22+
"test:ember": "ember test",
2123
"test:precook": "node node_modules/ember-cli-addon-tests/scripts/precook-node-modules.js"
2224
},
2325
"dependencies": {

0 commit comments

Comments
 (0)