-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract common code and fail build if lock is modified (#3272)
Signed-off-by: Guilherme Caponetto <[email protected]>
- Loading branch information
Showing
3 changed files
with
80 additions
and
28 deletions.
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: "Install UI dependencies" | ||
description: "Install UI dependencies; fail the build if the lock file is not up-to-date" | ||
|
||
inputs: | ||
working_dir: | ||
description: "Elyra path" | ||
required: false | ||
default: "." | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Go to working directory | ||
shell: bash | ||
run: | | ||
echo "Step: Go to working directory" | ||
cd ${{ inputs.working_dir }} | ||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
echo "Step: Install dependencies" | ||
make yarn-install | ||
- name: "Check yarn.lock" | ||
shell: bash | ||
run: | | ||
echo "Step: Check yarn.lock" | ||
git diff yarn.lock; | ||
[ "0" == "$(git diff yarn.lock | wc -l | tr -d ' ')" ] |
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,27 @@ | ||
name: "Install Yarn" | ||
description: "Install Yarn" | ||
|
||
inputs: | ||
working_dir: | ||
description: "Elyra path" | ||
required: false | ||
default: "." | ||
version: | ||
description: "Yarn version" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Go to working directory | ||
shell: bash | ||
run: | | ||
echo "Step: Go to working directory" | ||
cd ${{ inputs.working_dir }} | ||
- name: Install | ||
shell: bash | ||
run: | | ||
echo "Step: Install" | ||
corepack prepare yarn@${{ inputs.version }} --activate | ||
yarn set version ${{ inputs.version }} | ||
echo "Yarn version: $(yarn --version)" |
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