-
Notifications
You must be signed in to change notification settings - Fork 4
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
Revamp GitHub workflows using Ember.js native implementation #144
Changes from all commits
8671a1b
fce0ae8
1b51717
7b972d8
5b643a2
6d4336f
312d539
1e8ff88
154a8cd
8d18648
cbe621c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,213 +1,106 @@ | ||
# This file was autogenerated by create-github-actions-setup-for-ember-addons. | ||
# | ||
# You can upgrade the GitHub Actions workflow to the latest blueprints used | ||
# by Create GitHub Actions setup for Ember Addons by running it again: | ||
# | ||
# - `yarn create github-actions-setup-for-ember-addons` if using yarn and | ||
# - `npm init github-actions-setup-for-ember-addons` if using NPM. | ||
# | ||
# See https://github.com/jelhan/create-github-actions-setup-for-ember-addon for | ||
# details. | ||
# | ||
# The following lines contain the configuration used in the last run. Please do | ||
# not change them. Doing so could break upgrade flow. | ||
# | ||
#$ browsers: | ||
#$ - chrome | ||
#$ emberTryScenarios: | ||
#$ - scenario: lts-3.20 | ||
#$ - scenario: lts-3.24 | ||
#$ - scenario: release | ||
#$ - scenario: default-with-jquery | ||
#$ - scenario: classic | ||
#$ nodeVersion: 12.x | ||
#$ packageManager: yarn | ||
# | ||
|
||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
pull_request: {} | ||
|
||
env: | ||
NODE_VERSION: '12.x' | ||
NODE_VERSION: '12' | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: '${{ env.NODE_VERSION }}' | ||
|
||
- name: Get package manager's global cache path | ||
id: global-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- name: Cache package manager's global cache and node_modules | ||
id: cache-dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
${{ steps.global-cache-dir-path.outputs.dir }} | ||
node_modules | ||
key: ${{ runner.os }}-${{ matrix.node-version }}-${{ | ||
hashFiles('**/yarn.lock' | ||
) }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ matrix.node-version }}- | ||
|
||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
if: | | ||
steps.cache-dependencies.outputs.cache-hit != 'true' | ||
|
||
- name: Lint | ||
run: yarn lint | ||
- uses: actions/checkout@v2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This Action already uses |
||
|
||
- name: Install Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
cache: yarn | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This allows us to let the Action handles the caching of dependencies: |
||
|
||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Lint | ||
run: yarn run lint | ||
|
||
test: | ||
name: Tests | ||
runs-on: ${{ matrix.os }} | ||
needs: lint | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
browser: [chrome] | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: '${{ env.NODE_VERSION }}' | ||
|
||
- name: Get package manager's global cache path | ||
id: global-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- name: Cache package manager's global cache and node_modules | ||
id: cache-dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
${{ steps.global-cache-dir-path.outputs.dir }} | ||
node_modules | ||
key: ${{ runner.os }}-${{ matrix.node-version }}-${{ | ||
hashFiles('**/yarn.lock' | ||
) }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ matrix.node-version }}- | ||
|
||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
if: | | ||
steps.cache-dependencies.outputs.cache-hit != 'true' | ||
|
||
- name: Test | ||
run: yarn test:ember --launch ${{ matrix.browser }} | ||
|
||
|
||
floating-dependencies: | ||
name: Floating Dependencies | ||
runs-on: ${{ matrix.os }} | ||
needs: lint | ||
- uses: actions/checkout@v2 | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
browser: [chrome] | ||
- name: Install Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
cache: yarn | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: '${{ env.NODE_VERSION }}' | ||
- name: Run Tests | ||
run: yarn run test:ember | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We used to run the following command: (source)
( ⬆️. because I am not convinced There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems useful when you have multiple browsers in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Noice, thanks. |
||
|
||
- name: Get package manager's global cache path | ||
id: global-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
floating: | ||
name: Floating Dependencies | ||
needs: lint | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
|
||
- name: Cache package manager's global cache and node_modules | ||
id: cache-dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
${{ steps.global-cache-dir-path.outputs.dir }} | ||
node_modules | ||
key: ${{ runner.os }}-${{ matrix.node-version }}-floating-deps | ||
restore-keys: | | ||
${{ runner.os }}-${{ matrix.node-version }}- | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install Dependencies | ||
run: yarn install --no-lockfile --non-interactive | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
cache: yarn | ||
|
||
- name: Test | ||
run: yarn test:ember --launch ${{ matrix.browser }} | ||
- name: Install Dependencies | ||
run: yarn install --no-lockfile --non-interactive | ||
|
||
- name: Run Tests | ||
run: yarn run test:ember | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Answer provided, see the related link ✅ . |
||
|
||
try-scenarios: | ||
name: Tests - ${{ matrix.ember-try-scenario }} | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
name: ${{ matrix.try-scenario }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As we are updating this file, wondering if we should add timeout-minutes option, to avoid having issues with some scenarios running for 360 minutes (default value) because there is an issue in tests and no output is generated, see https://github.com/peopledoc/ember-cli-embedded/runs/3443628551?check_suite_focus=true for example Was happening mainly for Beta/Canary but could be a "security" for "ember-release" scenario 🤷♂️ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed, I actually thought about it yesterday and forgot to add it, thanks. |
||
needs: test | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
|
||
strategy: | ||
fail-fast: true | ||
matrix: | ||
ember-try-scenario: | ||
- lts-3.20 | ||
- lts-3.24 | ||
- release | ||
- default-with-jquery | ||
- classic | ||
try-scenario: | ||
- ember-lts-3.20 | ||
- ember-lts-3.24 | ||
- ember-release | ||
- ember-classic | ||
- ember-default-with-jquery | ||
- embroider-safe | ||
- embroider-optimized | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: '${{ env.NODE_VERSION }}' | ||
|
||
- name: Get package manager's global cache path | ||
id: global-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- name: Cache package manager's global cache and node_modules | ||
id: cache-dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
${{ steps.global-cache-dir-path.outputs.dir }} | ||
node_modules | ||
key: ${{ runner.os }}-${{ matrix.node-version }}-${{ | ||
hashFiles('**/yarn.lock' | ||
) }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ matrix.node-version }}- | ||
|
||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
if: | | ||
steps.cache-dependencies.outputs.cache-hit != 'true' | ||
|
||
- name: Test | ||
env: | ||
EMBER_TRY_SCENARIO: ${{ matrix.ember-try-scenario }} | ||
run: node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
cache: yarn | ||
|
||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Run Tests | ||
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The syntax
12
is enough if we just want to use the lastest major version.