-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
chore: add gleequore package and adapters #849
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
63611b9
chore: add gleequore package
fmvilas 8ce5219
Add release with changesets GitHub workflow
fmvilas 2d691fa
Change gleequore version to 0.0.0 and add changeset
fmvilas 2421410
Extracted adapters to separate packages and removed them from GleeQuore
fmvilas 7e11e78
Fix linting
fmvilas fb58855
Fix tests
fmvilas fc2897a
Sonar ignore docs
fmvilas eb43cd6
Increase code duplication threshold by now
fmvilas e35080e
Ignore duplicated lines from the adapters as they will be removed
fmvilas b063d7b
Keep ignore adapter stuff
fmvilas d83f2cb
Keep ignoring Dory
fmvilas bae5da2
Changing all packages version to 0.0.0 instead of 0.1.0
fmvilas 796434a
Add new changeset
fmvilas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@asyncapi/gleequore": minor | ||
--- | ||
|
||
Initial release |
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,11 @@ | ||
--- | ||
"@asyncapi/glee-redis-cluster-adapter": minor | ||
"@asyncapi/glee-web-server-adapter": minor | ||
"@asyncapi/glee-socketio-adapter": minor | ||
"@asyncapi/glee-kafka-adapter": minor | ||
"@asyncapi/glee-mqtt-adapter": minor | ||
"@asyncapi/glee-shared-utils": minor | ||
"@asyncapi/glee-web-adapter": minor | ||
--- | ||
|
||
Initial release of adapters and shared utils library |
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,129 @@ | ||
# It does magic only if there is a package.json file in the root of the project | ||
name: Release - if Node project | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
test-nodejs: | ||
# We just check the message of the first commit as there is always just one commit because we squash into one before merging | ||
# "commits" contains an array of objects where one of the properties is the commit "message" | ||
# Release workflow will be skipped if release conventional commits are not used | ||
if: | | ||
startsWith( github.repository, 'asyncapi/' ) | ||
name: Test NodeJS release on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
# Using macos-13 instead of latest (macos-14) due to an issue with Puppeteer and such runner. | ||
# See: https://github.com/puppeteer/puppeteer/issues/12327 and https://github.com/asyncapi/parser-js/issues/1001 | ||
os: [ubuntu-latest, macos-13, windows-latest] | ||
steps: | ||
- name: Set git to use LF # To once and for all finish the never-ending fight between Unix and Windows | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
shell: bash | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Check if Node.js project and has package.json | ||
id: packagejson | ||
run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT | ||
shell: bash | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Check package-lock version | ||
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master | ||
id: lockversion | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "${{ steps.lockversion.outputs.version }}" | ||
- if: steps.lockversion.outputs.version == '18' && matrix.os == 'windows-latest' | ||
name: Install npm cli 8 | ||
shell: bash | ||
# npm cli 10 is buggy because of some cache issues | ||
run: npm install -g [email protected] | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Install dependencies | ||
shell: bash | ||
run: npm ci | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Run test | ||
run: npm test --if-present | ||
- if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel | ||
name: Report workflow run status to Slack | ||
uses: 8398a7/action-slack@v3 | ||
with: | ||
status: ${{ job.status }} | ||
fields: repo,action,workflow | ||
text: "Release workflow failed in testing job" | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }} | ||
|
||
release: | ||
needs: [test-nodejs] | ||
name: Publish to any of NPM, GitHub, or Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set git to use LF # To once and for all finish the never-ending fight between Unix and Windows | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Check if Node.js project and has package.json | ||
id: packagejson | ||
run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT | ||
shell: bash | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Check package-lock version | ||
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master | ||
id: lockversion | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "${{ steps.lockversion.outputs.version }}" | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Install dependencies | ||
shell: bash | ||
run: npm ci | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Build dependency | ||
shell: bash | ||
run: npm run build | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Install changelog | ||
shell: bash | ||
run: npm install @changesets/[email protected] | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Publish to any of NPM, Github, and Docker Hub | ||
uses: changesets/action@v1 | ||
id: release | ||
with: | ||
version: npx -p @changesets/cli changeset version | ||
commit: version packages | ||
title: "chore(release): version packages" | ||
publish: npx -p @changesets/cli changeset publish | ||
setupGitUser: false | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
GIT_AUTHOR_NAME: asyncapi-bot | ||
GIT_AUTHOR_EMAIL: [email protected] | ||
GIT_COMMITTER_NAME: asyncapi-bot | ||
GIT_COMMITTER_EMAIL: [email protected] | ||
- if: failure() # Only, on failure, send a message on the 94_bot-failing-ci Slack channel | ||
name: Report workflow run status to Slack | ||
uses: 8398a7/action-slack@v3 | ||
with: | ||
status: ${{ job.status }} | ||
fields: repo,action,workflow | ||
text: "Release workflow failed in release job" | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }} |
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,2 +1,5 @@ | ||
#we need to explicitly exclude them as they're not relevant to the source code | ||
sonar.exclusions=packages/glee/examples/**/*,packages/glee/docs/**/* | ||
sonar.exclusions=packages/glee/examples/**/*,packages/glee/docs/**/*,packages/gleequore/docs/**/* | ||
|
||
# Ignore all duplicated code as it will be removed once we replace Glee's core with GleeQuore | ||
sonar.cpd.exclusions=packages/glee/src/adapters/**/*,packages/*-adapter/**/*,packages/shared-utils/**/*,packages/gleequore/**/* |
Validating CODEOWNERS rules …
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
Oops, something went wrong.
Oops, something went wrong.
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.
❗ Attention: this is a temporary but important change. Since we're in an intermediate step where lots of code is duplicated, Sonar is complaining. I'm adding this here for now but should be removed once we replace Glee's core with GleeQuore.