-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from getlarge/67-chore-move-to-nx-workspace
chore: move to nx workspace
- Loading branch information
Showing
190 changed files
with
13,137 additions
and
52,509 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,113 @@ | ||
{ | ||
"root": true, | ||
"ignorePatterns": ["**/*"], | ||
"plugins": ["@nx"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": { | ||
"@nx/enforce-module-boundaries": [ | ||
"error", | ||
{ | ||
"enforceBuildableLibDependency": true, | ||
"allow": [], | ||
"depConstraints": [ | ||
{ | ||
"sourceTag": "*", | ||
"onlyDependOnLibsWithTags": ["*"] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"extends": ["plugin:@nx/typescript", "eslint:recommended", "plugin:@typescript-eslint/recommended"], | ||
"plugins": [ | ||
"@typescript-eslint/eslint-plugin", | ||
"unused-imports", | ||
"import", | ||
"max-params-no-constructor", | ||
"simple-import-sort" | ||
], | ||
"rules": { | ||
"arrow-parens": "off", | ||
"complexity": "error", | ||
"interface-name": "off", | ||
"max-depth": "error", | ||
"max-lines": [ | ||
"error", | ||
{ | ||
"max": 400 | ||
} | ||
], | ||
"max-lines-per-function": [ | ||
"error", | ||
{ | ||
"max": 50 | ||
} | ||
], | ||
"max-nested-callbacks": [ | ||
"error", | ||
{ | ||
"max": 3 | ||
} | ||
], | ||
"max-params": ["error", 10], | ||
"max-params-no-constructor/max-params-no-constructor": ["error", 4], | ||
"member-access": "off", | ||
"no-console": [ | ||
"error", | ||
{ | ||
"allow": ["error", "warn", "info", "table"] | ||
} | ||
], | ||
"no-duplicate-imports": "error", | ||
"no-empty": "error", | ||
"no-fallthrough": "error", | ||
"no-param-reassign": "error", | ||
"no-unreachable": "error", | ||
"no-unreachable-loop": "error", | ||
"no-var": "error", | ||
"object-literal-sort-keys": "off", | ||
"prefer-const": "error", | ||
"quotes": [ | ||
"warn", | ||
"single", | ||
{ | ||
"avoidEscape": true | ||
} | ||
], | ||
"simple-import-sort/imports": [ | ||
"error", | ||
{ | ||
"groups": [ | ||
// Side effects. | ||
["^\\u0000"], | ||
// 3rd party. | ||
["^@?\\w"], | ||
// Anything not fitting group above. | ||
["^"], | ||
// Relative imports. | ||
["^\\."] | ||
] | ||
} | ||
], | ||
"simple-import-sort/exports": "error" | ||
} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"extends": ["plugin:@nx/javascript"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"], | ||
"env": { | ||
"jest": true | ||
}, | ||
"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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ on: | |
push: | ||
paths-ignore: | ||
- 'README.md' | ||
- 'renovate.json' | ||
- '**/package-lock.json' | ||
branches: | ||
- main | ||
|
@@ -16,7 +15,6 @@ on: | |
- ready_for_review | ||
paths-ignore: | ||
- 'README.md' | ||
- 'renovate.json' | ||
- '**/package-lock.json' | ||
branches: | ||
- main | ||
|
@@ -38,7 +36,7 @@ jobs: | |
|
||
strategy: | ||
matrix: | ||
node-version: [16.x, 18.x] | ||
node-version: [18.x, 20.x] | ||
|
||
services: | ||
rabbitmq: | ||
|
@@ -53,51 +51,49 @@ jobs: | |
|
||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Cache Node.js modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
cache: 'npm' | ||
|
||
- name: Derive appropriate SHAs for base and head for `nx affected` commands | ||
id: set-sha | ||
uses: nrwl/nx-set-shas@v3 | ||
uses: nrwl/nx-set-shas@v4 | ||
|
||
- name: Install dependencies | ||
run: npm run bootstrap | ||
run: npm ci | ||
|
||
- uses: 8BitJonny/[email protected] | ||
id: current-pr | ||
|
||
- if: steps.current-pr.outputs.number != 'null' && github.ref_name != 'main' | ||
# This line is needed for nx affected to work when CI is running on a PR | ||
run: git branch --track main origin/main | ||
|
||
# Boot package has issues with @asyncapi monorepo | ||
# - name: Scan dependencies with Audit CI | ||
# run: npm run scan:deps | ||
# run: npm run scan:deps | ||
|
||
- name: Build packages | ||
run: npm run build:affected | ||
- run: npx nx format:check | ||
|
||
- name: Run Jest tests | ||
run: npm run test:cov:affected | ||
- name: Run checks | ||
env: | ||
CI: true | ||
S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }} | ||
S3_BUCKET: ${{ secrets.S3_BUCKET }} | ||
S3_REGION: ${{ secrets.S3_REGION }} | ||
S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }} | ||
S3_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }} | ||
run: npx nx affected -t lint,test,build --parallel=3 | ||
|
||
- name: Upload coverage | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage-${{ matrix.node-version }} | ||
path: ./coverage | ||
|
@@ -110,16 +106,16 @@ jobs: | |
|
||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
node-version: [18.x] | ||
|
||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
|
@@ -128,7 +124,7 @@ jobs: | |
uses: martinbeentjes/npm-get-version-action@main | ||
|
||
- name: Retrieve coverage | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: coverage-${{ matrix.node-version }} | ||
path: ./coverage | ||
|
@@ -137,7 +133,6 @@ jobs: | |
uses: sonarsource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_URL: ${{ secrets.SONAR_URL }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
with: | ||
args: > | ||
|
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 |
---|---|---|
|
@@ -109,4 +109,8 @@ dist | |
# Sonar scanner | ||
.scannerwork | ||
|
||
junit.xml | ||
junit.xml | ||
|
||
#Nx | ||
.tmp/ | ||
.nx/cache |
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,4 @@ | ||
# Add files here to ignore them from prettier formatting | ||
/dist | ||
/coverage | ||
/.nx/cache |
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 @@ | ||
{ | ||
"singleQuote": true, | ||
"arrowParens": "always", | ||
"bracketSpacing": true, | ||
"endOfLine": "auto", | ||
"useTabs": false, | ||
"semi": true, | ||
"trailingComma": "all", | ||
"tabWidth": 2, | ||
"printWidth": 120 | ||
} |
This file was deleted.
Oops, something went wrong.
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,3 @@ | ||
{ | ||
"recommendations": ["nrwl.angular-console", "esbenp.prettier-vscode", "firsttris.vscode-jest-runner"] | ||
} |
Oops, something went wrong.