Skip to content

Commit b251e8a

Browse files
authoredMar 20, 2021
Merge pull request #5 from Windvis/github-actions-setup
Configure Github Actions
2 parents 2d0f51b + a271625 commit b251e8a

File tree

2 files changed

+232
-0
lines changed

2 files changed

+232
-0
lines changed
 

‎.github/workflows/ci.yml

+231
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
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.4
19+
#$ allowedToFail: false
20+
#$ - scenario: ember-lts-3.16
21+
#$ allowedToFail: false
22+
#$ - scenario: ember-lts-3.20
23+
#$ allowedToFail: false
24+
#$ - scenario: ember-release
25+
#$ allowedToFail: false
26+
#$ - scenario: ember-beta
27+
#$ allowedToFail: false
28+
#$ - scenario: ember-canary
29+
#$ allowedToFail: true
30+
#$ - scenario: ember-default-with-jquery
31+
#$ allowedToFail: false
32+
#$ - scenario: ember-classic
33+
#$ allowedToFail: false
34+
#$ nodeVersion: 10.x
35+
#$ packageManager: yarn
36+
#
37+
38+
name: CI
39+
40+
on:
41+
push:
42+
branches:
43+
- master
44+
pull_request:
45+
46+
env:
47+
NODE_VERSION: '10.x'
48+
49+
jobs:
50+
lint:
51+
name: Lint
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v2
55+
with:
56+
fetch-depth: 1
57+
58+
- uses: actions/setup-node@v2-beta
59+
with:
60+
node-version: '${{ env.NODE_VERSION }}'
61+
62+
- name: Get package manager's global cache path
63+
id: global-cache-dir-path
64+
run: echo "::set-output name=dir::$(yarn cache dir)"
65+
66+
- name: Cache package manager's global cache and node_modules
67+
id: cache-dependencies
68+
uses: actions/cache@v2
69+
with:
70+
path: |
71+
${{ steps.global-cache-dir-path.outputs.dir }}
72+
node_modules
73+
key: ${{ runner.os }}-${{ matrix.node-version }}-${{
74+
hashFiles('**/yarn.lock'
75+
) }}
76+
restore-keys: |
77+
${{ runner.os }}-${{ matrix.node-version }}-
78+
79+
- name: Install Dependencies
80+
run: yarn install --frozen-lockfile
81+
if: |
82+
steps.cache-dependencies.outputs.cache-hit != 'true'
83+
84+
- name: Lint
85+
run: yarn lint
86+
87+
88+
test:
89+
name: Tests
90+
runs-on: ${{ matrix.os }}
91+
needs: lint
92+
93+
strategy:
94+
matrix:
95+
os: [ubuntu-latest]
96+
browser: [chrome]
97+
98+
steps:
99+
- uses: actions/checkout@v2
100+
with:
101+
fetch-depth: 1
102+
103+
- uses: actions/setup-node@v2-beta
104+
with:
105+
node-version: '${{ env.NODE_VERSION }}'
106+
107+
- name: Get package manager's global cache path
108+
id: global-cache-dir-path
109+
run: echo "::set-output name=dir::$(yarn cache dir)"
110+
111+
- name: Cache package manager's global cache and node_modules
112+
id: cache-dependencies
113+
uses: actions/cache@v2
114+
with:
115+
path: |
116+
${{ steps.global-cache-dir-path.outputs.dir }}
117+
node_modules
118+
key: ${{ runner.os }}-${{ matrix.node-version }}-${{
119+
hashFiles('**/yarn.lock'
120+
) }}
121+
restore-keys: |
122+
${{ runner.os }}-${{ matrix.node-version }}-
123+
124+
- name: Install Dependencies
125+
run: yarn install --frozen-lockfile
126+
if: |
127+
steps.cache-dependencies.outputs.cache-hit != 'true'
128+
129+
- name: Test
130+
run: yarn test:ember --launch ${{ matrix.browser }}
131+
132+
133+
floating-dependencies:
134+
name: Floating Dependencies
135+
runs-on: ${{ matrix.os }}
136+
needs: lint
137+
138+
strategy:
139+
matrix:
140+
os: [ubuntu-latest]
141+
browser: [chrome]
142+
143+
steps:
144+
- uses: actions/checkout@v2
145+
with:
146+
fetch-depth: 1
147+
148+
- uses: actions/setup-node@v2-beta
149+
with:
150+
node-version: '${{ env.NODE_VERSION }}'
151+
152+
- name: Get package manager's global cache path
153+
id: global-cache-dir-path
154+
run: echo "::set-output name=dir::$(yarn cache dir)"
155+
156+
- name: Cache package manager's global cache and node_modules
157+
id: cache-dependencies
158+
uses: actions/cache@v2
159+
with:
160+
path: |
161+
${{ steps.global-cache-dir-path.outputs.dir }}
162+
node_modules
163+
key: ${{ runner.os }}-${{ matrix.node-version }}-floating-deps
164+
restore-keys: |
165+
${{ runner.os }}-${{ matrix.node-version }}-
166+
167+
- name: Install Dependencies
168+
run: yarn install --no-lockfile --non-interactive
169+
170+
- name: Test
171+
run: yarn test:ember --launch ${{ matrix.browser }}
172+
173+
174+
try-scenarios:
175+
name: Tests - ${{ matrix.ember-try-scenario }}
176+
runs-on: ubuntu-latest
177+
continue-on-error: ${{ matrix.allow-failure }}
178+
needs: test
179+
180+
strategy:
181+
fail-fast: true
182+
matrix:
183+
ember-try-scenario: [
184+
ember-lts-3.4,
185+
ember-lts-3.16,
186+
ember-lts-3.20,
187+
ember-release,
188+
ember-beta,
189+
ember-default-with-jquery,
190+
ember-classic
191+
]
192+
allow-failure: [false]
193+
include:
194+
- ember-try-scenario: ember-canary
195+
allow-failure: true
196+
197+
steps:
198+
- uses: actions/checkout@v2
199+
with:
200+
fetch-depth: 1
201+
202+
- uses: actions/setup-node@v2-beta
203+
with:
204+
node-version: '${{ env.NODE_VERSION }}'
205+
206+
- name: Get package manager's global cache path
207+
id: global-cache-dir-path
208+
run: echo "::set-output name=dir::$(yarn cache dir)"
209+
210+
- name: Cache package manager's global cache and node_modules
211+
id: cache-dependencies
212+
uses: actions/cache@v2
213+
with:
214+
path: |
215+
${{ steps.global-cache-dir-path.outputs.dir }}
216+
node_modules
217+
key: ${{ runner.os }}-${{ matrix.node-version }}-${{
218+
hashFiles('**/yarn.lock'
219+
) }}
220+
restore-keys: |
221+
${{ runner.os }}-${{ matrix.node-version }}-
222+
223+
- name: Install Dependencies
224+
run: yarn install --frozen-lockfile
225+
if: |
226+
steps.cache-dependencies.outputs.cache-hit != 'true'
227+
228+
- name: Test
229+
env:
230+
EMBER_TRY_SCENARIO: ${{ matrix.ember-try-scenario }}
231+
run: node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO

‎.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646

4747
# we recommend new addons test the current and previous LTS
4848
# as well as latest stable release (bonus points to beta/canary)
49+
- env: EMBER_TRY_SCENARIO=ember-lts-3.4
4950
- env: EMBER_TRY_SCENARIO=ember-lts-3.16
5051
- env: EMBER_TRY_SCENARIO=ember-lts-3.20
5152
- env: EMBER_TRY_SCENARIO=ember-release

0 commit comments

Comments
 (0)
Please sign in to comment.