-
Notifications
You must be signed in to change notification settings - Fork 3
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
CI - Reuse organisation's workflows to lint, test, tag and publish #160
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5918adf
ci: reuse workflow lint & tests from organisation
MrChocolatine 6d629b4
ci: reuse workflow tag & publish from organisation
MrChocolatine f7dda70
ci(ember-try): ensure Ember 3.x w/ `ember-classic`
MrChocolatine b7d1970
build: update `@embroider/test-setup@0.47.1`
MrChocolatine 28eba81
build: disable Embroider adapter `ember-get-config`
MrChocolatine b1137e9
build: run `npx yarn-deduplicate && yarn`
MrChocolatine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,214 +1,17 @@ | ||
# 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: ember-lts-3.20 | ||
#$ - scenario: ember-lts-3.24 | ||
#$ - scenario: ember-release | ||
#$ - scenario: ember-default-with-jquery | ||
#$ - scenario: ember-classic | ||
#$ nodeVersion: '12' | ||
#$ packageManager: yarn | ||
# | ||
# GitHub Actions documentation: | ||
# https://docs.github.com/en/actions | ||
|
||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: master | ||
pull_request: {} | ||
|
||
env: | ||
NODE_VERSION: '12' | ||
concurrency: | ||
group: ci-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: actions/setup-node@v2 | ||
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 | ||
|
||
|
||
test: | ||
name: Tests | ||
runs-on: ${{ matrix.os }} | ||
needs: lint | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
browser: [Chrome] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: actions/setup-node@v2 | ||
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 | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
browser: [Chrome] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: actions/setup-node@v2 | ||
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 }}-floating-deps | ||
restore-keys: | | ||
${{ runner.os }}-${{ matrix.node-version }}- | ||
|
||
- name: Install Dependencies | ||
run: yarn install --no-lockfile --non-interactive | ||
|
||
- name: Test | ||
run: yarn test:ember --launch ${{ matrix.browser }} | ||
|
||
|
||
try-scenarios: | ||
name: Tests - ${{ matrix.ember-try-scenario }} | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
needs: test | ||
|
||
strategy: | ||
fail-fast: true | ||
matrix: | ||
ember-try-scenario: [ | ||
ember-lts-3.20, | ||
ember-lts-3.24, | ||
ember-release, | ||
ember-default-with-jquery, | ||
ember-classic | ||
] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: actions/setup-node@v2 | ||
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 | ||
org: | ||
uses: peopledoc/.github/.github/workflows/js--emberjs-addons-ci.yml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# GitHub Actions documentation: | ||
# https://docs.github.com/en/actions | ||
|
||
name: Create new `git tag`, create new GitHub release and publish to NPM | ||
|
||
on: | ||
workflow_run: | ||
workflows: CI | ||
branches: master | ||
types: completed | ||
|
||
concurrency: | ||
group: tag-release-publish-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
org: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
uses: peopledoc/.github/.github/workflows/js--tag-release-publish.yml@main | ||
secrets: | ||
npm_automation_token: ${{ secrets.NPM_AUTOMATION_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This part cannot be moved in the reusable workflow (not supported yet), otherwise we get the error:
https://github.com/peopledoc/ember-feature-controls/actions/runs/1399155003
It must be declared in the caller workflow.
But it will be possible very soon, once this feature moves out of beta!
https://docs.github.com/en/actions/learn-github-actions/reusing-workflows#limitations