Skip to content

Commit ef50b41

Browse files
RajjjAryanCopilot
andauthored
fix: CI pipeline failures — lockfile, lint exclusions, Go check
* fix: CI failures — commit package-lock.json and exclude test-all.mjs from lint - Remove package-lock.json from .gitignore so npm ci works in CI - Commit the lockfile for reproducible builds - Exclude test-all.mjs from hardcoded path check (it legitimately contains /Users/ patterns as comments and grep assertions) Fixes all 7 failing CI jobs (6 test matrix + lint). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: exclude PR template and ci.yml from hardcoded path checks Both files legitimately contain /Users/ as example text in checklists and grep patterns. Exclude them from both the CI lint step and the test-all.mjs absolute path check. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: skip dashboard build test when Go is not installed macOS CI runners don't have Go pre-installed. The dashboard build is already tested in a dedicated CI job with actions/setup-go. The test suite now gracefully warns instead of failing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 85591be commit ef50b41

4 files changed

Lines changed: 75 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ jobs:
6666
--include='*.mjs' --include='*.js' --include='*.go' \
6767
--include='*.md' --include='*.yml' --include='*.yaml' \
6868
--exclude-dir=node_modules --exclude-dir=.git \
69-
--exclude='*.lock' .; then
69+
--exclude='*.lock' --exclude='test-all.mjs' \
70+
--exclude='PULL_REQUEST_TEMPLATE.md' --exclude='ci.yml' .; then
7071
echo "::error::Found hardcoded user paths in source files"
7172
exit 1
7273
fi

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ article-digest.md
3636
# Generated
3737
.resolved-prompt-*
3838
career-dashboard
39-
package-lock.json
4039

4140
# OS
4241
.DS_Store

package-lock.json

Lines changed: 63 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test-all.mjs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,16 @@ for (const { name, allowFail } of scripts) {
8383

8484
if (!QUICK) {
8585
console.log('\n3. Dashboard build');
86-
const goBuild = run('cd dashboard && go build -o /tmp/career-dashboard-test . 2>&1');
87-
if (goBuild !== null) {
88-
pass('Dashboard compiles');
86+
const goAvailable = run('which go 2>/dev/null');
87+
if (!goAvailable) {
88+
warn('Go not installed — skipping dashboard build');
8989
} else {
90-
fail('Dashboard build failed');
90+
const goBuild = run('cd dashboard && go build -o /tmp/career-dashboard-test . 2>&1');
91+
if (goBuild !== null) {
92+
pass('Dashboard compiles');
93+
} else {
94+
fail('Dashboard build failed');
95+
}
9196
}
9297
} else {
9398
console.log('\n3. Dashboard build (skipped --quick)');
@@ -211,7 +216,7 @@ if (!leakFound) {
211216
console.log('\n6. Absolute path check');
212217

213218
const absPathResult = run(
214-
`grep -rn "/Users/" --include="*.mjs" --include="*.sh" --include="*.md" --include="*.go" --include="*.yml" . 2>/dev/null | grep -v node_modules | grep -v ".git/" | grep -v README.md | grep -v LICENSE | grep -v go.sum | grep -v copilot-instructions.md | grep -v test-all.mjs`
219+
`grep -rn "/Users/" --include="*.mjs" --include="*.sh" --include="*.md" --include="*.go" --include="*.yml" . 2>/dev/null | grep -v node_modules | grep -v ".git/" | grep -v README.md | grep -v LICENSE | grep -v go.sum | grep -v copilot-instructions.md | grep -v test-all.mjs | grep -v PULL_REQUEST_TEMPLATE | grep -v ci.yml`
215220
);
216221
if (!absPathResult) {
217222
pass('No absolute paths in code files');

0 commit comments

Comments
 (0)