Skip to content

Commit

Permalink
ci(monorepo): Updates to CI workflow script execution
Browse files Browse the repository at this point in the history
  • Loading branch information
sullivanpj committed Oct 8, 2023
1 parent f54122e commit 4e6b7b2
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 107 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,11 @@ jobs:
echo "BASE: ${{ env.NX_BASE }}"
echo "HEAD: ${{ env.NX_HEAD }}"
- name: Prepare for build
run: pnpm build:tools-ci
#- name: Prepare for build
# run: pnpm build

- name: Build repository packages
run: pnpm build

#- name: Run Linters
# run: pnpm nx affected -t lint --parallel=3 --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }}
Expand All @@ -74,8 +77,7 @@ jobs:
# - run: npx nx affected -t lint --parallel=3
# - run: npx nx affected -t test --parallel=3 --configuration=ci --base=${{ github.event.before }}

- name: Build repository packages
run: pnpm nx affected -t build --parallel=3 --exclude="core-server-cloudflare,worker-*" --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }}
# run: pnpm nx affected -t build --parallel=5 --exclude="core-server-cloudflare,worker-*" --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }}
# run: pnpm nx affected -t build --parallel=3 --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }}

#- name: Run Tests
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ jobs:
cache-dependency-path: pnpm-lock.yaml

- name: Install Dependencies
run: pnpm i
run: pnpm ci

- name: Prepare for build
run: pnpm build:tools-ci
run: pnpm build

- name: Generate TSDocs Markdown with API Extractor
run: pnpm docs:api-extractor
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -284,5 +284,6 @@
******************************/
"commitizen.capitalizeWindowsDriveLetter": true,
"commitizen.autoSync": false,
"commitizen.showOutputChannel": "always"
"commitizen.showOutputChannel": "always",
"cSpell.words": ["postbuild"]
}
29 changes: 5 additions & 24 deletions apps/workers/contact-api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"projectType": "application",
"targets": {
"build": {
"executor": "@stormstack/tools-executors-typescript:cloudflare-worker-build",
"executor": "@stormstack/tools-nx-cloudflare:build",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
Expand Down Expand Up @@ -47,7 +47,7 @@
}
},
"serve": {
"executor": "@stormstack/tools-executors-typescript:cloudflare-worker-serve",
"executor": "@stormstack/tools-nx-cloudflare:serve",
"defaultConfiguration": "development",
"verbose": true,
"options": {
Expand All @@ -62,27 +62,8 @@
}
}
},
"lint": {
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/workers/contact-api/**/*.ts"]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/workers/contact-api/jest.config.ts",
"passWithNoTests": true
},
"configurations": {
"ci": {
"ci": true,
"codeCoverage": true
}
}
},
"lint": {},
"test": {},
"deploy-schema": {
"executor": "nx:run-commands",
"options": {
Expand All @@ -94,7 +75,7 @@
}
},
"deploy": {
"executor": "@stormstack/tools-executors-typescript:cloudflare-worker-deploy",
"executor": "@stormstack/tools-nx-cloudflare:deploy",
"defaultConfiguration": "production",
"tsconfig": "apps/workers/contact-api/tsconfig.json",
"options": {
Expand Down
29 changes: 5 additions & 24 deletions apps/workers/contact-attachments-upload/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"projectType": "application",
"targets": {
"build": {
"executor": "@stormstack/tools-executors-typescript:cloudflare-worker-build",
"executor": "@stormstack/tools-nx-cloudflare:build",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
Expand Down Expand Up @@ -51,7 +51,7 @@
}
},
"serve": {
"executor": "@stormstack/tools-executors-typescript:cloudflare-worker-serve",
"executor": "@stormstack/tools-nx-cloudflare:serve",
"defaultConfiguration": "development",
"options": {
"buildTarget": "worker-contact-attachments-upload:serve"
Expand All @@ -65,29 +65,10 @@
}
}
},
"lint": {
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/workers/contact-attachments-upload/**/*.ts"]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/workers/contact-attachments-upload/jest.config.ts",
"passWithNoTests": true
},
"configurations": {
"ci": {
"ci": true,
"codeCoverage": true
}
}
},
"lint": {},
"test": {},
"deploy": {
"executor": "@stormstack/tools-executors-typescript:cloudflare-worker-deploy",
"executor": "@stormstack/tools-nx-cloudflare:deploy",
"defaultConfiguration": "production",
"tsconfig": "apps/workers/contact-attachments-upload/tsconfig.json",
"options": {
Expand Down
29 changes: 5 additions & 24 deletions apps/workers/ratings-api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"projectType": "application",
"targets": {
"build": {
"executor": "@stormstack/tools-executors-typescript:cloudflare-worker-build",
"executor": "@stormstack/tools-nx-cloudflare:build",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
Expand Down Expand Up @@ -38,7 +38,7 @@
}
},
"serve": {
"executor": "@stormstack/tools-executors-typescript:cloudflare-worker-serve",
"executor": "@stormstack/tools-nx-cloudflare:serve",
"defaultConfiguration": "development",
"options": {
"buildTarget": "worker-ratings-api:serve"
Expand All @@ -52,29 +52,10 @@
}
}
},
"lint": {
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/workers/ratings-api/**/*.ts"]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/workers/ratings-api/jest.config.ts",
"passWithNoTests": true
},
"configurations": {
"ci": {
"ci": true,
"codeCoverage": true
}
}
},
"lint": {},
"test": {},
"deploy": {
"executor": "@stormstack/tools-executors-typescript:cloudflare-worker-deploy",
"executor": "@stormstack/tools-nx-cloudflare:deploy",
"defaultConfiguration": "production",
"name": "worker-ratings-api",
"tsconfig": "apps/workers/ratings-api/tsconfig.json",
Expand Down
28 changes: 4 additions & 24 deletions libs/common/typescript/server/events/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,11 @@
"tsConfig": "libs/common/typescript/server/events/tsconfig.lib.json",
"packageJson": "libs/common/typescript/server/events/package.json",
"main": "libs/common/typescript/server/events/src/index.ts",
"assets": ["libs/common/typescript/server/events/*.md"],
"updateBuildableProjectDepsInPackageJson": true
}
},
"lint": {
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/common/typescript/server/events/**/*.ts"]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "libs/common/typescript/server/events/jest.config.ts",
"passWithNoTests": true
},
"configurations": {
"ci": {
"ci": true,
"codeCoverage": true
}
"assets": ["libs/common/typescript/server/events/*.md"]
}
},
"lint": {},
"test": {},
"semantic-release": {
"executor": "@theunderscorer/nx-semantic-release:semantic-release",
"options": {
Expand All @@ -47,7 +27,7 @@
}
},
"generate": {
"executor": "@stormstack/tools-executors-typescript:event-library",
"executor": "@stormstack/tools-nx-event-catalog:event-library",
"outputs": ["{workspaceRoot}/dist/libs/common/typescript/server/events"],
"options": {
"outputPath": "",
Expand Down
13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,18 @@
"add:contributors": "all-contributors add",
"add:decisions": "pnpm log4brains adr new",
"analyze": "cross-env ANALYZE=true npm run build",
"build": "nx run-many -t build --all --parallel 4",
"prebuild": "pnpm clean && pnpm build:tools",
"build": "cross-env nx affected -t build --parallel=5 --exclude='core-server-cloudflare,worker-*' --base=NX_BASE --head=NX_HEAD",
"postbuild": "pnpm build:types",
"build:all": "nx run-many -t build --all --parallel 4",
"prebuild:design-token": "pnpm nx run design-system-tokens:style-dictionary",
"build:design-token": "pnpm nx run design-system-tokens:build:impact",
"build:relay": "relay-compiler ./dist/tools/devops/config/relay",
"build:storybook": "storybook build -s public",
"build:tools": "pnpm build:tools-ci && pnpm nx run design-system-tokens:build:impact",
"build:tools-ci": "pnpm nx run tools-nx-monorepo:build && pnpm nx run tools-nx-event-catalog:build && pnpm nx run design-system-tokens:style-dictionary",
"prebuild:tools": "pnpm nx run tools-devops-config:build",
"build:tools": "pnpm build:design-token && pnpm nx run tools-nx-monorepo:build && pnpm nx run tools-nx-event-catalog:build",
"build:types": "nx affected -t build:types",
"build:web-deploy": "pnpm run build:tools-ci && pnpm nx run web-shell:build:production",
"build:web-deploy": "pnpm nx run web-shell:build:production",
"clean": "rimraf dist",
"clean:apps": "rimraf dist/apps",
"clean:libs": "rimraf dist/libs",
Expand Down

0 comments on commit 4e6b7b2

Please sign in to comment.