-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: factorize CI with reusable workflows
- Loading branch information
Showing
12 changed files
with
297 additions
and
206 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
npm-package-fullname: | ||
required: true | ||
type: string | ||
os: | ||
required: true | ||
type: string | ||
# Set only one of these two inputs: | ||
node-version: | ||
required: false | ||
type: string | ||
node-version-file: | ||
required: false | ||
type: string | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
e2e-tests: | ||
runs-on: ${{ inputs.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # required by Log4brains to work correctly (needs the whole Git history) | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: ${{ inputs.node-version-file }} | ||
node-version: ${{ inputs.node-version }} | ||
|
||
- run: npm install -g ${{ inputs.npm-package-fullname }} | ||
|
||
# TODO: test the preview and add some assertions :-) For now we just check the exit codes. Or manage to run e2e-tests/e2e-launcher.js from here | ||
- name: Tests | ||
run: | | ||
log4brains --version | ||
log4brains init --defaults | ||
log4brains adr list | ||
log4brains build |
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,22 @@ | ||
on: | ||
workflow_call: | ||
outputs: | ||
version: | ||
description: "Log4brains current version" | ||
value: ${{ jobs.get-log4brains-version.outputs.version }} | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
get-log4brains-version: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.get-version.outputs.version }} | ||
steps: | ||
- name: Get log4brains version from lerna.json | ||
id: get-version | ||
run: | | ||
version="$(cat lerna.json | jq -r .version)" | ||
echo "::set-output name=version::$version" |
Oops, something went wrong.