Skip to content

Commit 86495b6

Browse files
denis-yuenclaude
andauthored
Pin CircleCI base image and store test results
Pin js_tests to cimg/base:2026.10-26.04 and add store_test_results for jasmine (JUnit XML) and ESLint results. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent b12fa3c commit 86495b6

5 files changed

Lines changed: 49 additions & 4 deletions

File tree

‎.circleci/config.yml‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262

6363
js_tests:
6464
docker:
65-
- image: cimg/base:current
65+
- image: cimg/base:2026.10-26.04
6666
steps:
6767
- checkout
6868
- install_container_dependencies
@@ -120,7 +120,10 @@ commands:
120120
steps:
121121
- run:
122122
name: lint
123-
command: npm run lint
123+
command: npm run lint -- -f junit -o test-results/eslint/eslint.xml
124+
- store_test_results:
125+
path: test-results
126+
when: always
124127

125128
install_container_dependencies:
126129
steps:
@@ -142,6 +145,9 @@ commands:
142145
- run:
143146
name: run unit tests
144147
command: bash -i -c 'npm run test'
148+
- store_test_results:
149+
path: test-results
150+
when: always
145151

146152
workflows:
147153
version: 2

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ git-secrets.sh
2222
*.iml
2323
dependency-reduced-pom.xml
2424
target
25+
26+
# Test results (JUnit XML)
27+
test-results/

‎package-lock.json‎

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

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"eslint-plugin-prettier": "^3.4.0",
1616
"husky": "^7.0.0",
1717
"jasmine": "^3.6.3",
18+
"jasmine-reporters": "^2.5.2",
1819
"jasmine-spec-reporter": "^6.0.0",
1920
"prettier": "^2.3.1"
2021
}

‎spec/helpers/reporter.js‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,14 @@ jasmine.getEnv().addReporter(
99
},
1010
})
1111
);
12+
13+
// Write JUnit XML on CircleCI so store_test_results can show a test summary
14+
if (process.env.CIRCLECI) {
15+
const reporters = require("jasmine-reporters");
16+
jasmine.getEnv().addReporter(
17+
new reporters.JUnitXmlReporter({
18+
savePath: "test-results/jasmine",
19+
consolidateAll: true,
20+
})
21+
);
22+
}

0 commit comments

Comments
 (0)