Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
fb4cf67
test: trigger failure in check-version-bump.yml
Vaz-Tiago Oct 9, 2025
244b9d2
fix: adjust workflow dependencies and triggers
Vaz-Tiago Oct 9, 2025
a661aac
fix: adjust workflow to validate version bump on PR open
Vaz-Tiago Oct 9, 2025
c161e91
fix: use sort -V for version comparison in workflows
Vaz-Tiago Oct 9, 2025
757169e
fix: add GH_TOKEN for GitHub CLI authentication
Vaz-Tiago Oct 9, 2025
ca73001
fix: adjust line breaks in GitHub comment
Vaz-Tiago Oct 9, 2025
a51d487
chore(release): publish v0.9.7
Vaz-Tiago Oct 9, 2025
5311047
fix: trigger Canary workflow on PR open
Vaz-Tiago Oct 9, 2025
4138123
chore: disable triggers in check-version-bump workflow
Vaz-Tiago Oct 10, 2025
bd6051d
fix: integrate version validation logic from check-version-bump into …
Vaz-Tiago Oct 10, 2025
d5fca75
fix: improve canary workflow success message and handle no publicatio…
Vaz-Tiago Oct 10, 2025
c46caa1
fix: add debug step to Publish canary for lerna.json validation
Vaz-Tiago Oct 10, 2025
1d1abde
refactor: remove ephemeral commit and base canary version on PR version
Vaz-Tiago Oct 10, 2025
0ca830c
fix: ensure canary version includes '-next' suffix
Vaz-Tiago Oct 10, 2025
9b9db86
fix: ensure branch validation and return to PR branch after main chec…
Vaz-Tiago Oct 10, 2025
a7867c7
chore: remove redundant branch validation steps
Vaz-Tiago Oct 10, 2025
5df55cf
chore: comment out NPM publish step for error scenario testing
Vaz-Tiago Oct 10, 2025
1c69d00
test: introduce deliberate versioning error for validation
Vaz-Tiago Oct 10, 2025
ead33e8
fix: restore workflow order and adjust versioning logic
Vaz-Tiago Oct 10, 2025
78964ec
test: adjust workflow for version validation
Vaz-Tiago Oct 10, 2025
545167b
test: update version to 0.9.7 for scenario testing
Vaz-Tiago Oct 10, 2025
c5201a1
test: introduce intentional failure in client package
Vaz-Tiago Oct 10, 2025
45f59e2
fix: add json-summary reporter to vitest coverage configuration
Vaz-Tiago Oct 10, 2025
6ab7de7
fix: remove intentional failing test
Vaz-Tiago Oct 10, 2025
c9f37ea
chore: bump versions to 0.9.8 for all packages
Vaz-Tiago Oct 10, 2025
15f2ec9
fix: update patch-release workflow to publish directly to NPM
Vaz-Tiago Oct 10, 2025
ae2fc24
fix: restrict canary workflow to PRs targeting main branch
Vaz-Tiago Oct 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 52 additions & 32 deletions .github/workflows/canary-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@ name: Canary

on:
pull_request:
branches: [main, latest]
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch: {}
types:
- opened
- synchronize
- reopened
branches:
- main

permissions:
contents: write
pull-requests: write
packages: write

concurrency:
group: canary-pr-${{ github.event.pull_request.number }}
group: canary-${{ github.run_id }}
cancel-in-progress: true

jobs:
Expand All @@ -36,6 +39,44 @@ jobs:
npm whoami || true
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Configure Git identity
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Set GitHub CLI token
run: echo "GH_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
- name: Validate Lerna version
run: |
# Checkout PR branch
git fetch origin ${{ github.head_ref }}
git checkout ${{ github.head_ref }}

# Get Lerna version from PR branch
pr_version=$(jq -r .version lerna.json)
echo "PR_VERSION=$pr_version" >> $GITHUB_ENV

# Checkout main branch
git fetch origin main
git checkout main

# Get Lerna version from main branch
main_version=$(jq -r .version lerna.json)
echo "MAIN_VERSION=$main_version" >> $GITHUB_ENV

# Return to PR branch
git checkout ${{ github.head_ref }}
echo "Branch ativa após retornar para PR: $(git rev-parse --abbrev-ref HEAD)"

# Display versions being compared
echo "VERSION MAIN: $main_version"
echo "VERSION PR: $pr_version"

# Compare versions
if printf "%s\n%s" "$main_version" "$pr_version" | sort -V | head -n1 | grep -q "$pr_version"; then
echo -e "⚠️ A versão do lerna.json no PR ($pr_version) não é válida.\n\nEla deve ser **MAIOR** que a versão atual da main ($main_version).\n\nPor favor, atualize sua branch com a main e rode o seguinte script para corrigir: version:patch" > comment.txt
gh issue comment ${{ github.event.pull_request.number }} --body-file comment.txt
exit 1
fi
- name: Install deps
run: yarn install --frozen-lockfile
- name: Build libs
Expand Down Expand Up @@ -96,25 +137,19 @@ jobs:
if: success()
id: version
run: |
BASE_VERSION=$(node -p 'require("./lerna.json").version')
SHORT_SHA=$(git rev-parse --short HEAD)
EPHEMERAL_VERSION="${BASE_VERSION}-next.${SHORT_SHA}.${GITHUB_RUN_ATTEMPT}"
echo "EPHEMERAL_VERSION=$EPHEMERAL_VERSION" >> $GITHUB_ENV
echo "EPHEMERAL_VERSION=$EPHEMERAL_VERSION" >> $GITHUB_OUTPUT
BASE_VERSION=$(jq -r .version lerna.json)
CANARY_VERSION="${BASE_VERSION}-next.$(git rev-parse --short HEAD)"
echo "CANARY_VERSION=$CANARY_VERSION" >> $GITHUB_ENV
echo "CANARY_VERSION=$CANARY_VERSION" >> $GITHUB_OUTPUT
- name: Inject ephemeral version in packages
if: success()
run: |
EPV="$EPHEMERAL_VERSION"
EPV="$CANARY_VERSION"
echo "Aplicando versão efêmera $EPV nos package.json (sem commit)"
jq --arg v "$EPV" '.version = $v' lerna.json > lerna.tmp && mv lerna.tmp lerna.json
for PKG in packages/*/package.json; do
jq --arg v "$EPV" '.version = $v' "$PKG" > "$PKG.tmp" && mv "$PKG.tmp" "$PKG" || exit 1
done
- name: Git identity for ephemeral commit
if: success()
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Ephemeral commit (local, not pushed)
if: success()
run: |
Expand All @@ -123,7 +158,7 @@ jobs:
if git diff --cached --quiet; then
echo "Sem mudanças para commit (rerun?)"
else
git commit -m "chore(ci): ephemeral canary version $EPHEMERAL_VERSION" || true
git commit -m "chore(ci): ephemeral canary version $CANARY_VERSION" || true
fi
git status --short
- name: Publish canary (no commit/tag)
Expand All @@ -132,8 +167,7 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npx lerna publish from-package --dist-tag next --yes --no-verify-access || echo "Nenhum pacote alterado para publicar (ok)"
echo "CURRENT_VERSION=$EPHEMERAL_VERSION" >> $GITHUB_ENV

echo "CURRENT_VERSION=$CANARY_VERSION" >> $GITHUB_ENV
- name: Revert ephemeral commit (keep tree clean for PR)
if: success()
run: |
Expand All @@ -156,17 +190,3 @@ jobs:
repo: context.repo.repo,
body
});
- name: PR Failure Comment
if: failure()
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const number = context.payload.pull_request.number;
const body = 'Canary não publicado: testes falharam. Verifique os logs do workflow.';
await github.rest.issues.createComment({
issue_number: number,
owner: context.repo.owner,
repo: context.repo.repo,
body
});
11 changes: 4 additions & 7 deletions .github/workflows/patch-release-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,10 @@ jobs:
run: yarn install --frozen-lockfile
- name: Build libs
run: yarn build:libs
- name: Patch version & publish
id: patch
run: |
yarn publish:patch
VERSION=$(node -p 'require("./lerna.json").version')
echo "CURRENT_VERSION=$VERSION" >> $GITHUB_ENV
echo "PREVIOUS_TAG=$(git describe --tags --abbrev=0 --exclude $VERSION 2>/dev/null || echo '')" >> $GITHUB_ENV
- name: Publish to NPM
run: lerna publish from-package --yes --no-verify-access
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: PR Comment
uses: actions/github-script@v6
with:
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/prerelease.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/release.yml

This file was deleted.

8 changes: 3 additions & 5 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"packages": [
"packages/*"
],
"version": "0.9.6",
"packages": ["packages/*"],
"version": "0.9.8",
"npmClient": "yarn",
"command": {
"publish": {
Expand All @@ -19,4 +17,4 @@
"message": "chore(release): publish %s"
}
}
}
}
2 changes: 1 addition & 1 deletion packages/atlas-theme/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@iq-firebolt/atlas-theme",
"version": "0.9.6",
"version": "0.9.8",
"description": "> ATLAS Theme",
"author": "iq team",
"homepage": "https://github.com/IQ-tech/firebolt#readme",
Expand Down
2 changes: 1 addition & 1 deletion packages/aurora-theme/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@iq-firebolt/aurora-theme",
"version": "0.9.6",
"version": "0.9.8",
"description": "> AURORA Theme",
"author": "iq team",
"homepage": "https://github.com/IQ-tech/firebolt#readme",
Expand Down
4 changes: 2 additions & 2 deletions packages/blueberry/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@iq-firebolt/blueberry-theme",
"version": "0.9.6",
"version": "0.9.8",
"description": "> TODO: description",
"author": "iq team",
"homepage": "https://github.com/IQ-tech/firebolt#readme",
Expand All @@ -24,7 +24,7 @@
"iq-blueberry": "^0.0.88"
},
"devDependencies": {
"@iq-firebolt/validators": "0.9.6",
"@iq-firebolt/validators": "0.9.8",
"react": "18.2.0",
"react-dom": "18.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/br-addons/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@iq-firebolt/br-addons",
"version": "0.9.6",
"version": "0.9.8",
"description": "> TODO: description",
"author": "iq team",
"homepage": "https://github.com/IQ-tech/firebolt#readme",
Expand Down
2 changes: 1 addition & 1 deletion packages/client-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@iq-firebolt/client-core",
"version": "0.9.6",
"version": "0.9.8",
"description": "> TODO: description",
"author": "iq team",
"homepage": "https://github.com/IQ-tech/firebolt#readme",
Expand Down
8 changes: 4 additions & 4 deletions packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@iq-firebolt/client",
"version": "0.9.6",
"version": "0.9.8",
"description": "> TODO: description",
"author": "iq team",
"homepage": "https://github.com/IQ-tech/firebolt#readme",
Expand Down Expand Up @@ -36,8 +36,8 @@
},
"dependencies": {
"@babel/runtime": "^7.16.3",
"@iq-firebolt/client-core": "0.9.6",
"@iq-firebolt/validators": "0.9.6",
"@iq-firebolt/client-core": "0.9.8",
"@iq-firebolt/validators": "0.9.8",
"classnames": "^2.3.1",
"fast-levenshtein": "^3.0.0",
"regex-parser": "^2.2.11",
Expand All @@ -49,7 +49,7 @@
"@babel/plugin-transform-runtime": "^7.16.0",
"@babel/preset-env": "^7.15.6",
"@babel/preset-react": "^7.14.5",
"@iq-firebolt/material-theme": "0.9.6",
"@iq-firebolt/material-theme": "0.9.8",
"@rollup/plugin-node-resolve": "^16.0.1",
"@testing-library/react-hooks": "^7.0.2",
"autoprefixer": "^10.4.2",
Expand Down
6 changes: 6 additions & 0 deletions packages/client/src/Main.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,9 @@ describe("testing props-presets render", () => {
).toBeInTheDocument()
})
})

describe("Force failure", () => {
it("should pass intentionally", () => {
expect(true).toBe(true)
})
})
2 changes: 1 addition & 1 deletion packages/entities/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@iq-firebolt/entities",
"version": "0.9.6",
"version": "0.9.8",
"description": "> TODO: description",
"author": "iq team",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/json-schema/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@iq-firebolt/json-schema",
"version": "0.9.6",
"version": "0.9.8",
"description": "json schema lib",
"author": "iq team",
"homepage": "https://github.com/IQ-tech/firebolt#readme",
Expand Down
12 changes: 6 additions & 6 deletions packages/lab/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@iq-firebolt/lab",
"version": "0.9.6",
"version": "0.9.8",
"private": true,
"license": "Apache-2.0",
"dependencies": {
"@iq-firebolt/blueberry-theme": "0.9.6",
"@iq-firebolt/br-addons": "0.8.3-next.148",
"@iq-firebolt/client": "0.9.6",
"@iq-firebolt/client-core": "0.9.6",
"@iq-firebolt/material-theme": "0.9.6",
"@iq-firebolt/blueberry-theme": "0.9.8",
"@iq-firebolt/br-addons": "0.9.8",
"@iq-firebolt/client": "0.9.8",
"@iq-firebolt/client-core": "0.9.8",
"@iq-firebolt/material-theme": "0.9.8",
"iq-blueberry": "^0.0.88",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/material-theme/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@iq-firebolt/material-theme",
"version": "0.9.6",
"version": "0.9.8",
"description": "> TODO: description",
"author": "iq team",
"homepage": "https://github.com/IQ-tech/firebolt#readme",
Expand Down
2 changes: 1 addition & 1 deletion packages/validators/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@iq-firebolt/validators",
"version": "0.9.6",
"version": "0.9.8",
"description": "> TODO: description",
"author": "iq team",
"homepage": "https://github.com/IQ-tech/firebolt#readme",
Expand Down
2 changes: 1 addition & 1 deletion vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default defineConfig({
// Coverage configuration
coverage: {
provider: "v8",
reporter: ["text", "json", "html", "lcov"],
reporter: ["text", "json", "json-summary", "html", "lcov"], // Added json-summary
// Only include files that have corresponding tests
all: false,
include: [
Expand Down