-
Notifications
You must be signed in to change notification settings - Fork 93
[RHCLOUD-42870] Nx tool migration #1518
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
Open
Jakub007d
wants to merge
15
commits into
data-driven-forms:master
Choose a base branch
from
Jakub007d:nx-tool-migration
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
b0f58be
chore: adding Nx workspace configuration
Jakub007d 3919997
ci: adding Github Actions to run tests/build/linters using NX
Jakub007d 1d2408e
fix: installing nx for project
Jakub007d 3435b1e
fix: CI fix
Jakub007d b88a661
fix: nx.json config
Jakub007d ec9b4ed
fix: CI fix
Jakub007d d7e9daf
fix: using yarn build instead of rollup
Jakub007d 8a2f1d9
fix: removing uneeded typecheck from parser and removing uneeded impl…
Jakub007d 62ad341
fix: making nx release run
Jakub007d 23e49e8
ci: adding --first-release tag
Jakub007d 9186926
fix: empty commit
Jakub007d 3ce4078
ci: Running CI checks also on push
Jakub007d 06e8e80
feat: removing lerna and semantic-release
Jakub007d 3cfa84f
fix: fixing failing test in form renderer
Jakub007d 5ecbdd8
Adding script for project.json generation for sub-packages
Jakub007d 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 hidden or 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 |
|---|---|---|
|
|
@@ -2,14 +2,94 @@ on: | |
| pull_request: | ||
| branches: | ||
| - master | ||
| push: | ||
| branches: | ||
| - master | ||
|
|
||
| jobs: | ||
| github-action-show-version: | ||
| if: github.event_name == 'pull_request' | ||
| runs-on: ubuntu-latest | ||
| name: Next version is | ||
| steps: | ||
| - name: Publish a version comment | ||
| uses: rvsia/[email protected] | ||
| id: comment | ||
| with: | ||
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|
|
||
| # Job that runs for both PR and merge | ||
| ci-checks: | ||
| runs-on: ubuntu-latest | ||
| name: CI Checks (Build, Lint, Test, Release Dry-Run) | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'yarn' | ||
|
|
||
| - name: Install dependencies | ||
| run: yarn install --frozen-lockfile | ||
|
|
||
| - name: Derive appropriate SHAs for base and head for nx affected commands | ||
| uses: nrwl/nx-set-shas@v4 | ||
| with: | ||
| main-branch-name: 'master' | ||
|
|
||
| - name: Run build on affected projects | ||
| run: npx nx affected --target=build --parallel=3 | ||
| continue-on-error: false | ||
|
|
||
| - name: Run lint on affected projects | ||
| run: npx nx affected --target=lint --parallel=3 | ||
| continue-on-error: false | ||
|
|
||
| - name: Run typecheck on affected projects | ||
| run: npx nx affected --target=typecheck --parallel=3 | ||
| continue-on-error: false | ||
|
|
||
| - name: Clear Jest cache | ||
| run: yarn jest --clearCache | ||
|
|
||
| - name: Run tests on affected projects | ||
| run: npx nx affected --target=test --parallel=3 --coverage | ||
| continue-on-error: false | ||
|
|
||
| - name: Run Nx release dry-run (PR only) | ||
| if: github.event_name == 'pull_request' | ||
| run: npx nx release --first-release --dry-run --verbose | ||
|
|
||
| # Job that runs ONLY after merge (on push to master) | ||
| release: | ||
| if: github.event_name != 'pull_request' | ||
| needs: ci-checks | ||
| runs-on: ubuntu-latest | ||
| name: Release | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'yarn' | ||
|
|
||
| - name: Install dependencies | ||
| run: yarn install --frozen-lockfile | ||
|
|
||
| - name: 🚀 Run Nx Release | ||
| run: | | ||
| npx nx release --first-release --skip-publish --verbose | ||
| npx nx release --first-release publish --skip-existing --verbose | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -78,3 +78,6 @@ packages/**/size-snapshot.json | |
| .nvmrc | ||
|
|
||
| .DS_STORE | ||
|
|
||
| # NX cache | ||
| .nx/ | ||
This file contains hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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,72 @@ | ||
| { | ||
| "$schema": "./node_modules/nx/schemas/nx-schema.json", | ||
| "workspaceLayout": { | ||
| "libsDir": "packages", | ||
| "appsDir": "apps" | ||
| }, | ||
| "plugins": [ | ||
| { | ||
| "plugin": "@nx/js", | ||
| "exclude": ["**/node_modules/**"], | ||
| "options": { | ||
| "typecheck": { | ||
| "targetName": "typecheck" | ||
| }, | ||
| "build": { | ||
| "targetName": "build" | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| "plugin": "@nx/js/typescript", | ||
| "exclude": ["**/node_modules/**"], | ||
| "options": { | ||
| "typecheck": { | ||
| "targetName": "typecheck" | ||
| }, | ||
| "build": { | ||
| "targetName": "build", | ||
| "buildDepsName": "build-deps", | ||
| "watchDepsName": "watch-deps" | ||
| } | ||
| } | ||
| } | ||
| ], | ||
| "release": { | ||
| "projects": [ | ||
| "@data-driven-forms/ant-component-mapper", | ||
| "@data-driven-forms/blueprint-component-mapper", | ||
| "@data-driven-forms/carbon-component-mapper", | ||
| "@data-driven-forms/common", | ||
| "@data-driven-forms/mui-component-mapper", | ||
| "@data-driven-forms/parsers", | ||
| "@data-driven-forms/pf4-component-mapper", | ||
| "@data-driven-forms/react-form-renderer", | ||
| "@data-driven-forms/react-renderer-demo", | ||
| "@data-driven-forms/suir-component-mapper" | ||
| ], | ||
| "changelog": { | ||
| "projectChangelogs": { | ||
| "createRelease": "github" | ||
| } | ||
| }, | ||
| "projectsRelationship": "independent", | ||
| "version": { | ||
| "conventionalCommits": true, | ||
| "fallbackCurrentVersionResolver": "disk" | ||
| } | ||
| }, | ||
| "namedInputs": { | ||
| "sharedGlobals": ["{workspaceRoot}/.github/workflows/release.yml"], | ||
| "default": [ | ||
| "sharedGlobals", | ||
| "{projectRoot}/src/**/*", | ||
| "{projectRoot}/package.json", | ||
| "{projectRoot}/README.md", | ||
| "{projectRoot}/LICENSE", | ||
| "{projectRoot}/babel.config.js", | ||
| "{projectRoot}/tsconfig.json", | ||
| "!{projectRoot}/src/tests/**/*" | ||
| ] | ||
| } | ||
| } | ||
This file contains hidden or 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 hidden or 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 hidden or 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.
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.
@Jakub007d quick AI review comment:
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.
fixed