Skip to content

Commit a3e9ef6

Browse files
committed
DO-1082: Restructure CI workflow with separate build, test, and lint jobs sharing cached dependencies
1 parent 1d5ec06 commit a3e9ef6

File tree

71 files changed

+51031
-20
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+51031
-20
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
applyTo: '**'
3+
---
4+
5+
// This file is automatically generated by Nx Console
6+
7+
You are in an nx workspace using Nx 20.0.10 and npm as the package manager.
8+
9+
You have access to the Nx MCP server and the tools it provides. Use them. Follow these guidelines in order to best help the user:
10+
11+
# General Guidelines
12+
- When answering questions, use the nx_workspace tool first to gain an understanding of the workspace architecture
13+
- For questions around nx configuration, best practices or if you're unsure, use the nx_docs tool to get relevant, up-to-date docs!! Always use this instead of assuming things about nx configuration
14+
- If the user needs help with an Nx configuration or project graph error, use the 'nx_workspace' tool to get any errors
15+
- To help answer questions about the workspace structure or simply help with demonstrating how tasks depend on each other, use the 'nx_visualize_graph' tool
16+
17+
# Generation Guidelines
18+
If the user wants to generate something, use the following flow:
19+
20+
- learn about the nx workspace and any specifics the user needs by using the 'nx_workspace' tool and the 'nx_project_details' tool if applicable
21+
- get the available generators using the 'nx_generators' tool
22+
- decide which generator to use. If no generators seem relevant, check the 'nx_available_plugins' tool to see if the user could install a plugin to help them
23+
- get generator details using the 'nx_generator_schema' tool
24+
- you may use the 'nx_docs' tool to learn more about a specific generator or technology if you're unsure
25+
- decide which options to provide in order to best complete the user's request. Don't make any assumptions and keep the options minimalistic
26+
- open the generator UI using the 'nx_open_generate_ui' tool
27+
- wait for the user to finish the generator
28+
- read the generator log file using the 'nx_read_generator_log' tool
29+
- use the information provided in the log file to answer the user's question or continue with what they were doing
30+
31+
32+

.github/workflows/build.yml

Lines changed: 66 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: Build
1+
name: CI
22

33
on: [pull_request]
44

55
jobs:
6-
build:
6+
install:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v2
@@ -14,6 +14,70 @@ jobs:
1414
with:
1515
node-version: 16
1616
registry-url: https://registry.npmjs.org/
17+
cache: 'npm'
1718
- run: npm ci
19+
- name: Cache node_modules
20+
uses: actions/cache@v2
21+
with:
22+
path: node_modules
23+
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}
24+
25+
lint:
26+
runs-on: ubuntu-latest
27+
needs: install
28+
steps:
29+
- uses: actions/checkout@v2
30+
with:
31+
ref: ${{ github.event.pull_request.head.ref }}
32+
- name: Use Node.js 16
33+
uses: actions/setup-node@v1
34+
with:
35+
node-version: 16
36+
registry-url: https://registry.npmjs.org/
37+
cache: 'npm'
38+
- name: Restore node_modules
39+
uses: actions/cache@v2
40+
with:
41+
path: node_modules
42+
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}
43+
- run: yarn nx run-many -t lint
44+
45+
build:
46+
runs-on: ubuntu-latest
47+
needs: install
48+
steps:
49+
- uses: actions/checkout@v2
50+
with:
51+
ref: ${{ github.event.pull_request.head.ref }}
52+
- name: Use Node.js 16
53+
uses: actions/setup-node@v1
54+
with:
55+
node-version: 16
56+
registry-url: https://registry.npmjs.org/
57+
cache: 'npm'
58+
- name: Restore node_modules
59+
uses: actions/cache@v2
60+
with:
61+
path: node_modules
62+
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}
1863
- run: yarn nx run-many -t build
64+
65+
test:
66+
runs-on: ubuntu-latest
67+
needs: install
68+
steps:
69+
- uses: actions/checkout@v2
70+
with:
71+
ref: ${{ github.event.pull_request.head.ref }}
72+
- name: Use Node.js 16
73+
uses: actions/setup-node@v1
74+
with:
75+
node-version: 16
76+
registry-url: https://registry.npmjs.org/
77+
cache: 'npm'
78+
- name: Restore node_modules
79+
uses: actions/cache@v2
80+
with:
81+
path: node_modules
82+
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}
1983
- run: yarn nx run-many -t test

.github/workflows/lint.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.npmignore

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# These are some examples of commonly ignored file patterns.
2+
# You should customize this list as applicable to your project.
3+
# Learn more about .gitignore:
4+
# https://www.atlassian.com/git/tutorials/saving-changes/gitignore
5+
# Node artifact files
6+
node_modules/
7+
dist/
8+
# Yarn (https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored)
9+
.yarn/*
10+
!.yarn/cache
11+
!.yarn/patches
12+
!.yarn/plugins
13+
!.yarn/releases
14+
!.yarn/sdks
15+
!.yarn/versions
16+
# Compiled Java class files
17+
*.class
18+
# Compiled Python bytecode
19+
*.py[cod]
20+
# Log files
21+
*.log
22+
# Package files
23+
*.jar
24+
# Maven
25+
target/
26+
# JetBrains IDE
27+
.idea/
28+
# VSCode IDE
29+
.vscode/
30+
# Unit test reports
31+
TEST*.xml
32+
# Generated by MacOS
33+
.DS_Store
34+
# Generated by Windows
35+
Thumbs.db
36+
# Applications
37+
*.app
38+
*.exe
39+
*.war
40+
# Large media files
41+
*.mp4
42+
*.tiff
43+
*.avi
44+
*.flv
45+
*.mov
46+
*.wmv
47+
!jest.config.js
48+
# CDK asset staging directory
49+
.cdk.staging
50+
cdk.out
51+
*.tsbuildinfo
52+
*.d.ts
53+
.nx/cache
54+
.nx/workspace-data
55+
!jest.preset.js
56+
# Used during the publish stage
57+
.npmignore
58+
.cursor/rules/nx-rules.mdc
59+
.github/instructions/nx.instructions.md
60+
# Ignores added from .gitignore at the package level
61+
# Compiled JavaScript files
62+
packages/prerender-fargate/*.js
63+
packages/prerender-fargate/*.d.ts
64+
packages/prerender-fargate/*.js.map
65+
# Keep the prerender assets
66+
!packages/prerender-fargate/lib/prerender/**/*.js
67+
# Keep test files
68+
!packages/prerender-fargate/*.test.ts
69+
!packages/prerender-fargate/*.spec.ts
70+
!packages/prerender-fargate/jest.config.ts
71+
# Ignores added from .npmignore at the package level

.nx/cache/run.json

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
{
2+
"run": {
3+
"command": "nx run-many -t build",
4+
"startTime": "2025-08-08T03:10:43.127Z",
5+
"endTime": "2025-08-08T03:10:48.589Z",
6+
"inner": false
7+
},
8+
"tasks": [
9+
{
10+
"taskId": "@aligent/cdk-basic-auth:build",
11+
"target": "build",
12+
"projectName": "@aligent/cdk-basic-auth",
13+
"hash": "17876752537642102571",
14+
"startTime": "2025-08-08T03:10:43.140Z",
15+
"endTime": "2025-08-08T03:10:44.367Z",
16+
"params": "",
17+
"cacheStatus": "cache-miss",
18+
"status": 1
19+
},
20+
{
21+
"taskId": "@aligent/cdk-waf:build",
22+
"target": "build",
23+
"projectName": "@aligent/cdk-waf",
24+
"hash": "5101644061895701886",
25+
"startTime": "2025-08-08T03:10:43.140Z",
26+
"endTime": "2025-08-08T03:10:44.445Z",
27+
"params": "",
28+
"cacheStatus": "cache-miss",
29+
"status": 1
30+
},
31+
{
32+
"taskId": "@aligent/cdk-stack-deploy-iam:build",
33+
"target": "build",
34+
"projectName": "@aligent/cdk-stack-deploy-iam",
35+
"hash": "18404548904730030489",
36+
"startTime": "2025-08-08T03:10:44.445Z",
37+
"endTime": "2025-08-08T03:10:44.969Z",
38+
"params": "",
39+
"cacheStatus": "cache-miss",
40+
"status": 1
41+
},
42+
{
43+
"taskId": "@aligent/cdk-prerender-proxy:build",
44+
"target": "build",
45+
"projectName": "@aligent/cdk-prerender-proxy",
46+
"hash": "18144325775424879669",
47+
"startTime": "2025-08-08T03:10:44.367Z",
48+
"endTime": "2025-08-08T03:10:45.605Z",
49+
"params": "",
50+
"cacheStatus": "cache-miss",
51+
"status": 1
52+
},
53+
{
54+
"taskId": "@aligent/cdk-serverless-deploy-iam:build",
55+
"target": "build",
56+
"projectName": "@aligent/cdk-serverless-deploy-iam",
57+
"hash": "14860250603390455124",
58+
"startTime": "2025-08-08T03:10:45.605Z",
59+
"endTime": "2025-08-08T03:10:46.272Z",
60+
"params": "",
61+
"cacheStatus": "cache-miss",
62+
"status": 1
63+
},
64+
{
65+
"taskId": "@aligent/cdk-cloudfront-security-headers:build",
66+
"target": "build",
67+
"projectName": "@aligent/cdk-cloudfront-security-headers",
68+
"hash": "3217130744311812729",
69+
"startTime": "2025-08-08T03:10:44.969Z",
70+
"endTime": "2025-08-08T03:10:46.347Z",
71+
"params": "",
72+
"cacheStatus": "cache-miss",
73+
"status": 1
74+
},
75+
{
76+
"taskId": "@aligent/cdk-eventbridge-iam:build",
77+
"target": "build",
78+
"projectName": "@aligent/cdk-eventbridge-iam",
79+
"hash": "2995680366306253125",
80+
"startTime": "2025-08-08T03:10:46.272Z",
81+
"endTime": "2025-08-08T03:10:46.798Z",
82+
"params": "",
83+
"cacheStatus": "cache-miss",
84+
"status": 1
85+
},
86+
{
87+
"taskId": "@aligent/aws-cdk-pipeline-stack:build",
88+
"target": "build",
89+
"projectName": "@aligent/aws-cdk-pipeline-stack",
90+
"hash": "12012766468484466524",
91+
"startTime": "2025-08-08T03:10:46.347Z",
92+
"endTime": "2025-08-08T03:10:46.903Z",
93+
"params": "",
94+
"cacheStatus": "cache-miss",
95+
"status": 1
96+
},
97+
{
98+
"taskId": "@aligent/cdk-geoip-redirect:build",
99+
"target": "build",
100+
"projectName": "@aligent/cdk-geoip-redirect",
101+
"hash": "3073556376441731321",
102+
"startTime": "2025-08-08T03:10:43.140Z",
103+
"endTime": "2025-08-08T03:10:46.933Z",
104+
"params": "",
105+
"cacheStatus": "cache-miss",
106+
"status": 1
107+
},
108+
{
109+
"taskId": "@aligent/cdk-rabbitmq:build",
110+
"target": "build",
111+
"projectName": "@aligent/cdk-rabbitmq",
112+
"hash": "7535728023472930707",
113+
"startTime": "2025-08-08T03:10:46.903Z",
114+
"endTime": "2025-08-08T03:10:48.161Z",
115+
"params": "",
116+
"cacheStatus": "cache-miss",
117+
"status": 1
118+
},
119+
{
120+
"taskId": "@aligent/cdk-static-hosting:build",
121+
"target": "build",
122+
"projectName": "@aligent/cdk-static-hosting",
123+
"hash": "13054392966730720967",
124+
"startTime": "2025-08-08T03:10:46.798Z",
125+
"endTime": "2025-08-08T03:10:48.589Z",
126+
"params": "",
127+
"cacheStatus": "cache-miss",
128+
"status": 1
129+
}
130+
]
131+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
> eslint .
2+
3+
(node:2484169) ESLintRCWarning: You are using an eslintrc configuration file, which is deprecated and support will be removed in v10.0.0. Please migrate to an eslint.config.js file. See https://eslint.org/docs/latest/use/configure/migration-guide for details. An eslintrc configuration file is used because you have the ESLINT_USE_FLAT_CONFIG environment variable set to false. If you want to use an eslint.config.js file, remove the environment variable. If you want to find the location of the eslintrc configuration file, use the --debug flag.
4+
(Use `node --trace-warnings ...` to show where the warning was created)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
Linting "static-hosting"...
3+
4+
✔ All files pass linting
5+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
> eslint . --fix
2+
3+
(node:2475636) ESLintRCWarning: You are using an eslintrc configuration file, which is deprecated and support will be removed in v10.0.0. Please migrate to an eslint.config.js file. See https://eslint.org/docs/latest/use/configure/migration-guide for details. An eslintrc configuration file is used because you have the ESLINT_USE_FLAT_CONFIG environment variable set to false. If you want to use an eslint.config.js file, remove the environment variable. If you want to find the location of the eslintrc configuration file, use the --debug flag.
4+
(Use `node --trace-warnings ...` to show where the warning was created)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
npm warn config ignoring workspace config at /home/daniel.vanderploeg/repos/cdk/cdk-constructs/packages/pipeline-stack/.npmrc
2+
3+
> @aligent/[email protected] build
4+
> tsc
5+
6+
lib/pipeline-stack.ts(1,31): error TS2307: Cannot find module '@aws-cdk/aws-codepipeline' or its corresponding type declarations.
7+
lib/pipeline-stack.ts(2,39): error TS2307: Cannot find module '@aws-cdk/aws-codepipeline-actions' or its corresponding type declarations.
8+
lib/pipeline-stack.ts(3,66): error TS2307: Cannot find module '@aws-cdk/core' or its corresponding type declarations.
9+
lib/pipeline-stack.ts(4,48): error TS2307: Cannot find module '@aws-cdk/pipelines' or its corresponding type declarations.
10+
npm error Lifecycle script `build` failed with error:
11+
npm error code 2
12+
npm error path /home/daniel.vanderploeg/repos/cdk/cdk-constructs/packages/pipeline-stack
13+
npm error workspace @aligent/[email protected]
14+
npm error location /home/daniel.vanderploeg/repos/cdk/cdk-constructs/packages/pipeline-stack
15+
npm error command failed
16+
npm error command sh -c tsc
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
Linting "esbuild"...
3+
4+
✔ All files pass linting
5+

0 commit comments

Comments
 (0)