Skip to content

Commit 18fcde1

Browse files
committed
ci: migrate to github actions
Special thanks to Jeldrik Hanschke (@jelhan) for making the article and repo linked before, which helped me to get started. (This is my first attempt at using them for CI.) https://dev.to/jelhan/setup-github-actions-as-ci-for-ember-addons-5c33 https://github.com/jelhan/create-github-actions-setup-for-ember-addon Drop Travis CI badge & config
1 parent 101a9c9 commit 18fcde1

File tree

3 files changed

+218
-70
lines changed

3 files changed

+218
-70
lines changed

.github/workflows/ci.yml

Lines changed: 218 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
# This file was autogenerated by create-github-actions-setup-for-ember-addons.
2+
#
3+
# You can upgrade the GitHub Actions workflow to the latest blueprints used
4+
# by Create GitHub Actions setup for Ember Addons by running it again:
5+
#
6+
# - `yarn create github-actions-setup-for-ember-addons` if using yarn and
7+
# - `npm init github-actions-setup-for-ember-addons` if using NPM.
8+
#
9+
# See https://github.com/jelhan/create-github-actions-setup-for-ember-addon for
10+
# details.
11+
#
12+
# The following lines contain the configuration used in the last run. Please do
13+
# not change them. Doing so could break upgrade flow.
14+
#
15+
#$ browsers:
16+
#$ - chrome
17+
#$ emberTryScenarios:
18+
#$ - scenario: ember-lts-3.16
19+
#$ - scenario: ember-lts-3.20
20+
#$ - scenario: ember-release
21+
#$ - scenario: ember-beta
22+
#$ - scenario: ember-canary
23+
#$ - scenario: ember-default-with-jquery
24+
#$ - scenario: ember-classic
25+
#$ nodeVersion: 10.x
26+
#$ packageManager: yarn
27+
#
28+
29+
name: CI
30+
31+
on:
32+
push:
33+
branches:
34+
- master
35+
pull_request:
36+
37+
env:
38+
NODE_VERSION: '10.x'
39+
40+
jobs:
41+
lint:
42+
name: Lint
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v2
46+
with:
47+
fetch-depth: 1
48+
49+
- uses: actions/setup-node@v2-beta
50+
with:
51+
node-version: '${{ env.NODE_VERSION }}'
52+
53+
- name: Get package manager's global cache path
54+
id: global-cache-dir-path
55+
run: echo "::set-output name=dir::$(yarn cache dir)"
56+
57+
- name: Cache package manager's global cache and node_modules
58+
id: cache-dependencies
59+
uses: actions/cache@v2
60+
with:
61+
path: |
62+
${{ steps.global-cache-dir-path.outputs.dir }}
63+
node_modules
64+
key: ${{ runner.os }}-${{ matrix.node-version }}-${{
65+
hashFiles('**/yarn.lock'
66+
) }}
67+
restore-keys: |
68+
${{ runner.os }}-${{ matrix.node-version }}-
69+
70+
- name: Install Dependencies
71+
run: yarn install --frozen-lockfile
72+
if: |
73+
steps.cache-dependencies.outputs.cache-hit != 'true'
74+
75+
- name: Lint
76+
run: yarn lint
77+
78+
79+
test:
80+
name: Tests
81+
runs-on: ${{ matrix.os }}
82+
needs: lint
83+
84+
strategy:
85+
matrix:
86+
os: [ubuntu-latest]
87+
browser: [chrome]
88+
89+
steps:
90+
- uses: actions/checkout@v2
91+
with:
92+
fetch-depth: 1
93+
94+
- uses: actions/setup-node@v2-beta
95+
with:
96+
node-version: '${{ env.NODE_VERSION }}'
97+
98+
- name: Get package manager's global cache path
99+
id: global-cache-dir-path
100+
run: echo "::set-output name=dir::$(yarn cache dir)"
101+
102+
- name: Cache package manager's global cache and node_modules
103+
id: cache-dependencies
104+
uses: actions/cache@v2
105+
with:
106+
path: |
107+
${{ steps.global-cache-dir-path.outputs.dir }}
108+
node_modules
109+
key: ${{ runner.os }}-${{ matrix.node-version }}-${{
110+
hashFiles('**/yarn.lock'
111+
) }}
112+
restore-keys: |
113+
${{ runner.os }}-${{ matrix.node-version }}-
114+
115+
- name: Install Dependencies
116+
run: yarn install --frozen-lockfile
117+
if: |
118+
steps.cache-dependencies.outputs.cache-hit != 'true'
119+
120+
- name: Test
121+
run: yarn test:ember --launch ${{ matrix.browser }}
122+
123+
124+
floating-dependencies:
125+
name: Floating Dependencies
126+
runs-on: ${{ matrix.os }}
127+
needs: lint
128+
129+
strategy:
130+
matrix:
131+
os: [ubuntu-latest]
132+
browser: [chrome]
133+
134+
steps:
135+
- uses: actions/checkout@v2
136+
with:
137+
fetch-depth: 1
138+
139+
- uses: actions/setup-node@v2-beta
140+
with:
141+
node-version: '${{ env.NODE_VERSION }}'
142+
143+
- name: Get package manager's global cache path
144+
id: global-cache-dir-path
145+
run: echo "::set-output name=dir::$(yarn cache dir)"
146+
147+
- name: Cache package manager's global cache and node_modules
148+
id: cache-dependencies
149+
uses: actions/cache@v2
150+
with:
151+
path: |
152+
${{ steps.global-cache-dir-path.outputs.dir }}
153+
node_modules
154+
key: ${{ runner.os }}-${{ matrix.node-version }}-floating-deps
155+
restore-keys: |
156+
${{ runner.os }}-${{ matrix.node-version }}-
157+
158+
- name: Install Dependencies
159+
run: yarn install --no-lockfile --non-interactive
160+
161+
- name: Test
162+
run: yarn test:ember --launch ${{ matrix.browser }}
163+
164+
165+
try-scenarios:
166+
name: Tests - ${{ matrix.ember-try-scenario }}
167+
runs-on: ubuntu-latest
168+
continue-on-error: true
169+
needs: test
170+
171+
strategy:
172+
fail-fast: true
173+
matrix:
174+
ember-try-scenario: [
175+
ember-lts-3.16,
176+
ember-lts-3.20,
177+
ember-release,
178+
ember-beta,
179+
ember-canary,
180+
ember-default-with-jquery,
181+
ember-classic
182+
]
183+
184+
steps:
185+
- uses: actions/checkout@v2
186+
with:
187+
fetch-depth: 1
188+
189+
- uses: actions/setup-node@v2-beta
190+
with:
191+
node-version: '${{ env.NODE_VERSION }}'
192+
193+
- name: Get package manager's global cache path
194+
id: global-cache-dir-path
195+
run: echo "::set-output name=dir::$(yarn cache dir)"
196+
197+
- name: Cache package manager's global cache and node_modules
198+
id: cache-dependencies
199+
uses: actions/cache@v2
200+
with:
201+
path: |
202+
${{ steps.global-cache-dir-path.outputs.dir }}
203+
node_modules
204+
key: ${{ runner.os }}-${{ matrix.node-version }}-${{
205+
hashFiles('**/yarn.lock'
206+
) }}
207+
restore-keys: |
208+
${{ runner.os }}-${{ matrix.node-version }}-
209+
210+
- name: Install Dependencies
211+
run: yarn install --frozen-lockfile
212+
if: |
213+
steps.cache-dependencies.outputs.cache-hit != 'true'
214+
215+
- name: Test
216+
env:
217+
EMBER_TRY_SCENARIO: ${{ matrix.ember-try-scenario }}
218+
run: node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO

.travis.yml

Lines changed: 0 additions & 69 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# ember-cli-plotly
22

33
[![Latest NPM release](https://img.shields.io/npm/v/ember-cli-plotly)](https://www.npmjs.com/package/ember-cli-plotly)
4-
[![Build Status](https://travis-ci.com/EmberMN/ember-cli-plotly.svg?branch=master)](https://travis-ci.com/EmberMN/ember-cli-plotly)
54
[![Maintainability](https://api.codeclimate.com/v1/badges/a99a88d28ad37a79dbf6/maintainability)](https://codeclimate.com/github/codeclimate/codeclimate/maintainability)
65
[![Ember Observer Score](https://emberobserver.com/badges/ember-cli-plotly.svg)](https://emberobserver.com/addons/ember-cli-plotly)
76
[![Dependencies up to date](https://david-dm.org/EmberMN/ember-cli-plotly/status.svg)](https://david-dm.org/EmberMN/ember-cli-plotly)

0 commit comments

Comments
 (0)