From b3f8c437611b78ec1c39b9e0ab20bbeecba7ed50 Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 18:02:56 -0500 Subject: [PATCH 01/41] Update ci.yml --- .github/workflows/ci.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d527cb4..ab0dd2c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,20 +1,32 @@ name: Workflow for Codecov example-javascript + on: [push, pull_request] + jobs: run: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 + - name: Set up Node 18 uses: actions/setup-node@v3 with: node-version: 18 + - name: Install dependencies run: npm install + - name: Run tests and collect coverage run: npm run test - - name: Upload coverage to Codecov + + - name: Upload code coverage to Codecov uses: codecov/codecov-action@v5 env: CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} + + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 + with: + token: ${{ secrets.CODECOV_ORG_TOKEN }} From 0537289214f4c619b3468cf2d71e7af31c66811c Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 18:05:25 -0500 Subject: [PATCH 02/41] Update package.json --- package.json | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 99cf7ed..724e5b2 100644 --- a/package.json +++ b/package.json @@ -3,16 +3,12 @@ "version": "0.0.1", "description": "Codecov Example Javascript", "scripts": { - "test": "vitest run --coverage --coverageReporters=lcov --coverageReporters=text --coverageReporters=html" - + "test": "vitest run --coverage" }, "dependencies": { - "vitest": "^3.0.0", - "codecov": "^3.8.0" + "vitest": "^3.0.0" }, "devDependencies": { - "jest": "^29.0.0", - "jest-environment-jsdom": "^29.0.0", - "codecov": "^3.8.0" + "vitest-junit-reporter": "^0.5.0" } } From 515a5712dd3bd172c0d22011f821c916b87e89c3 Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 18:07:49 -0500 Subject: [PATCH 03/41] Update vite.config.js --- vite.config.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/vite.config.js b/vite.config.js index 8d38c43..79fa42f 100644 --- a/vite.config.js +++ b/vite.config.js @@ -3,9 +3,13 @@ import { defineConfig } from 'vitest/config' export default defineConfig({ test: { coverage: { - provider: 'v8', // Use V8 as the coverage provider - reporters: ['text', 'json', 'html', 'lcov'], // Include 'html' and 'lcov' for HTML and LCOV reports - reportDir: 'coverage', // Optional: specify the directory for coverage reports + provider: 'v8', + reporters: ['text', 'json', 'html', 'lcov'], + reportDir: 'coverage', }, + reporters: [ + 'default', + ['vitest-junit-reporter', { outputFile: 'junit.xml' }] + ] }, }) From cd164d3aa51a52e698bc241351cedda0be72f51e Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 18:08:29 -0500 Subject: [PATCH 04/41] Update enforce-license-compliance.yml --- .github/workflows/enforce-license-compliance.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/enforce-license-compliance.yml b/.github/workflows/enforce-license-compliance.yml index 86be741..538d029 100644 --- a/.github/workflows/enforce-license-compliance.yml +++ b/.github/workflows/enforce-license-compliance.yml @@ -1,8 +1,7 @@ name: Enforce License Compliance on: - pull_request: - branches: [main, master] + jobs: enforce-license-compliance: From 094a2663df6b80c3e4eb27878d0a80d953c46602 Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 18:09:41 -0500 Subject: [PATCH 05/41] Update vite.config.js --- vite.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vite.config.js b/vite.config.js index 79fa42f..4d71abe 100644 --- a/vite.config.js +++ b/vite.config.js @@ -9,7 +9,7 @@ export default defineConfig({ }, reporters: [ 'default', - ['vitest-junit-reporter', { outputFile: 'junit.xml' }] + ['junit', { outputFile: 'junit.xml' }] ] }, }) From 3d6580b97210202799f1960304b50c0cc8f37d05 Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 18:09:56 -0500 Subject: [PATCH 06/41] Update package.json --- package.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/package.json b/package.json index 724e5b2..cfe4cc2 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,5 @@ }, "dependencies": { "vitest": "^3.0.0" - }, - "devDependencies": { - "vitest-junit-reporter": "^0.5.0" } } From 0bbef1d92e9766365a9be53f07c0406b68e78c0c Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 18:10:55 -0500 Subject: [PATCH 07/41] Update package.json --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index cfe4cc2..0ac929d 100644 --- a/package.json +++ b/package.json @@ -7,5 +7,8 @@ }, "dependencies": { "vitest": "^3.0.0" + }, + "devDependencies": { + "@vitest/coverage-v8": "^1.0.0" } } From 7a0e56523907909d49382e726e1d3ab85d0d7611 Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 18:11:57 -0500 Subject: [PATCH 08/41] Update vite.config.js --- vite.config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/vite.config.js b/vite.config.js index 4d71abe..dfe63a9 100644 --- a/vite.config.js +++ b/vite.config.js @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' export default defineConfig({ test: { coverage: { - provider: 'v8', reporters: ['text', 'json', 'html', 'lcov'], reportDir: 'coverage', }, From 33c9c3f9a371d6d0f5846d16dabee6fd8f98e1dd Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 18:12:09 -0500 Subject: [PATCH 09/41] Update package.json --- package.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/package.json b/package.json index 0ac929d..cfe4cc2 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,5 @@ }, "dependencies": { "vitest": "^3.0.0" - }, - "devDependencies": { - "@vitest/coverage-v8": "^1.0.0" } } From fc60a4e008203949367a102f841e8197a0634ea3 Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 18:16:09 -0500 Subject: [PATCH 10/41] Update ci.yml --- .github/workflows/ci.yml | 42 +++++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab0dd2c..43bfbe8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,24 +1,52 @@ -name: Workflow for Codecov example-javascript +name: Codecov CI with Vitest on: [push, pull_request] jobs: - run: + test: runs-on: ubuntu-latest + steps: - - name: Checkout + - name: Checkout repository uses: actions/checkout@v4 - - name: Set up Node 18 + - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: 18 - - name: Install dependencies + - name: Clean install vitest 3.x directly (force fresh state) + run: | + rm -rf node_modules package-lock.json + npm install vitest@latest + + - name: Add vitest-junit reporter (built-in, no extra install needed) + run: | + echo "{}" > package.json + npm install vitest@latest + + - name: Install dependencies (optional if you have others) run: npm install - - name: Run tests and collect coverage - run: npm run test + - name: Create vitest config (if not checked in already) + run: | + mkdir -p test + echo "import { defineConfig } from 'vitest/config' + export default defineConfig({ + test: { + coverage: { + reporters: ['text', 'json', 'html', 'lcov'], + reportDir: 'coverage' + }, + reporters: [ + 'default', + ['junit', { outputFile: 'junit.xml' }] + ] + } + })" > vitest.config.ts + + - name: Run tests with coverage + run: npm run test || true # Don't fail the build if tests fail (Codecov still collects) - name: Upload code coverage to Codecov uses: codecov/codecov-action@v5 From 644a76533a1627dd752c6a1061ea957ce4adb82d Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 18:18:25 -0500 Subject: [PATCH 11/41] Update ci.yml --- .github/workflows/ci.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43bfbe8..956b4fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,19 +18,15 @@ jobs: - name: Clean install vitest 3.x directly (force fresh state) run: | rm -rf node_modules package-lock.json + npm init -y npm install vitest@latest - - name: Add vitest-junit reporter (built-in, no extra install needed) + - name: Add test script to package.json run: | - echo "{}" > package.json - npm install vitest@latest - - - name: Install dependencies (optional if you have others) - run: npm install + npm set-script test "vitest run --coverage" - - name: Create vitest config (if not checked in already) + - name: Create vitest.config.ts (if not checked in already) run: | - mkdir -p test echo "import { defineConfig } from 'vitest/config' export default defineConfig({ test: { @@ -46,7 +42,7 @@ jobs: })" > vitest.config.ts - name: Run tests with coverage - run: npm run test || true # Don't fail the build if tests fail (Codecov still collects) + run: npm run test || true - name: Upload code coverage to Codecov uses: codecov/codecov-action@v5 From 0aecfea5eb827aab35f88276713e9f34ab83999c Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 18:19:21 -0500 Subject: [PATCH 12/41] Update ci.yml --- .github/workflows/ci.yml | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 956b4fa..dc445de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,31 +15,8 @@ jobs: with: node-version: 18 - - name: Clean install vitest 3.x directly (force fresh state) - run: | - rm -rf node_modules package-lock.json - npm init -y - npm install vitest@latest - - - name: Add test script to package.json - run: | - npm set-script test "vitest run --coverage" - - - name: Create vitest.config.ts (if not checked in already) - run: | - echo "import { defineConfig } from 'vitest/config' - export default defineConfig({ - test: { - coverage: { - reporters: ['text', 'json', 'html', 'lcov'], - reportDir: 'coverage' - }, - reporters: [ - 'default', - ['junit', { outputFile: 'junit.xml' }] - ] - } - })" > vitest.config.ts + - name: Install dependencies + run: npm ci - name: Run tests with coverage run: npm run test || true From 97f82b3db1a33832cd344dbefb9ad515704a09a9 Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 19:35:35 -0500 Subject: [PATCH 13/41] Update vite.config.js --- vite.config.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/vite.config.js b/vite.config.js index dfe63a9..e28d159 100644 --- a/vite.config.js +++ b/vite.config.js @@ -2,10 +2,7 @@ import { defineConfig } from 'vitest/config' export default defineConfig({ test: { - coverage: { - reporters: ['text', 'json', 'html', 'lcov'], - reportDir: 'coverage', - }, + include: ['app/**/*.test.js'], reporters: [ 'default', ['junit', { outputFile: 'junit.xml' }] From 21b3a03d9657117de075e13b3fe3bfc97174e740 Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 19:37:26 -0500 Subject: [PATCH 14/41] Update vite.config.js --- vite.config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vite.config.js b/vite.config.js index e28d159..5cd5773 100644 --- a/vite.config.js +++ b/vite.config.js @@ -3,6 +3,11 @@ import { defineConfig } from 'vitest/config' export default defineConfig({ test: { include: ['app/**/*.test.js'], + coverage: { + provider: 'v8', + reporters: ['text', 'json', 'html', 'lcov'], + reportDir: 'coverage' + }, reporters: [ 'default', ['junit', { outputFile: 'junit.xml' }] From 5c461ee779bf6abdcf9d6c92565ed07ace634999 Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 19:37:38 -0500 Subject: [PATCH 15/41] Update package.json --- package.json | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index cfe4cc2..87f8205 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,13 @@ { - "name": "@codecov/example-javascript", - "version": "0.0.1", - "description": "Codecov Example Javascript", + "name": "example-javascript", + "version": "1.0.0", "scripts": { "test": "vitest run --coverage" }, "dependencies": { - "vitest": "^3.0.0" + "vitest": "^3.2.3" + }, + "devDependencies": { + "@vitest/coverage-v8": "^1.6.1" } } From b1e6f8da58ce46b4ff6898792e755e591086f231 Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 19:38:51 -0500 Subject: [PATCH 16/41] Update package.json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 87f8205..4bf8be1 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,9 @@ "test": "vitest run --coverage" }, "dependencies": { - "vitest": "^3.2.3" + "vitest": "1.6.1" }, "devDependencies": { - "@vitest/coverage-v8": "^1.6.1" + "@vitest/coverage-v8": "1.6.1" } } From f363e9b02f87f304b37a31570679c2ec35056377 Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 19:39:00 -0500 Subject: [PATCH 17/41] Update vite.config.js --- vite.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vite.config.js b/vite.config.js index 5cd5773..7c669c9 100644 --- a/vite.config.js +++ b/vite.config.js @@ -12,5 +12,5 @@ export default defineConfig({ 'default', ['junit', { outputFile: 'junit.xml' }] ] - }, + } }) From 9956e1015aa843c0d2dd797036badefcd068d85f Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 19:41:52 -0500 Subject: [PATCH 18/41] Update ci.yml --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc445de..a655586 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ -name: Codecov CI with Vitest +name: Codecov CI with Vitest (fully dynamic build) -on: [push, pull_request] +on: [push] jobs: test: @@ -15,8 +15,31 @@ jobs: with: node-version: 18 - - name: Install dependencies - run: npm ci + - name: Initialize clean package.json + run: | + npm init -y + npm install vitest@1.6.1 @vitest/coverage-v8@1.6.1 + + - name: Add test script to package.json + run: npm set-script test "vitest run --coverage" + + - name: Create vitest.config.ts + run: | + echo "import { defineConfig } from 'vitest/config' + export default defineConfig({ + test: { + include: ['app/**/*.test.js'], + coverage: { + provider: 'v8', + reporters: ['text', 'json', 'html', 'lcov'], + reportDir: 'coverage' + }, + reporters: [ + 'default', + ['junit', { outputFile: 'junit.xml' }] + ] + } + })" > vitest.config.ts - name: Run tests with coverage run: npm run test || true From 4e7e737509292ccf141792cd0537aea97f054f72 Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 19:43:02 -0500 Subject: [PATCH 19/41] Update ci.yml --- .github/workflows/ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a655586..4a229af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ -name: Codecov CI with Vitest (fully dynamic build) +name: Codecov CI with Vitest (final fully portable version) -on: [push] +on: [push, pull_request] jobs: test: @@ -20,8 +20,9 @@ jobs: npm init -y npm install vitest@1.6.1 @vitest/coverage-v8@1.6.1 - - name: Add test script to package.json - run: npm set-script test "vitest run --coverage" + - name: Add test script manually + run: | + jq '.scripts.test="vitest run --coverage"' package.json > tmp.json && mv tmp.json package.json - name: Create vitest.config.ts run: | From df8ad67224fab4308f3dce066b945caa78bebedc Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 19:52:16 -0500 Subject: [PATCH 20/41] Update vite.config.js --- vite.config.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/vite.config.js b/vite.config.js index 7c669c9..83f5634 100644 --- a/vite.config.js +++ b/vite.config.js @@ -6,11 +6,10 @@ export default defineConfig({ coverage: { provider: 'v8', reporters: ['text', 'json', 'html', 'lcov'], - reportDir: 'coverage' - }, - reporters: [ - 'default', - ['junit', { outputFile: 'junit.xml' }] - ] - } + reportDir: 'coverage', + excludeNodeModules: true, + reportsDirectory: './coverage', + clean: true + } + }, }) From d3a0a0eae318bcd69a61bbd5f455a5aa3c69d385 Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 19:54:30 -0500 Subject: [PATCH 21/41] Update vite.config.js --- vite.config.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/vite.config.js b/vite.config.js index 83f5634..7b820a5 100644 --- a/vite.config.js +++ b/vite.config.js @@ -5,11 +5,8 @@ export default defineConfig({ include: ['app/**/*.test.js'], coverage: { provider: 'v8', - reporters: ['text', 'json', 'html', 'lcov'], - reportDir: 'coverage', - excludeNodeModules: true, - reportsDirectory: './coverage', - clean: true + reporters: ['lcov', 'text', 'json', 'html'], + reportDir: 'coverage' } - }, + } }) From 29fd99b43f17e7f5d4ef27c23c24d2e3170ad1a7 Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 19:55:37 -0500 Subject: [PATCH 22/41] Update ci.yml --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a229af..c38a4dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,6 +45,9 @@ jobs: - name: Run tests with coverage run: npm run test || true + - name: List coverage files (debugging) + run: ls -R coverage + - name: Upload code coverage to Codecov uses: codecov/codecov-action@v5 env: From 35b90329f17f4c534d8b0803e240619c48ebb873 Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 19:57:09 -0500 Subject: [PATCH 23/41] Update calculator.test.js --- app/calculator.test.js | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/app/calculator.test.js b/app/calculator.test.js index 20869fa..53b897f 100644 --- a/app/calculator.test.js +++ b/app/calculator.test.js @@ -1,4 +1,4 @@ -import { expect, test } from '@jest/globals'; +import { expect, test } from 'vitest'; import { add, @@ -25,17 +25,5 @@ test('subtract function', () => { }); test('multiply function', () => { - expect(multiply(1, 2)).toBe(2.0); - expect(multiply(1.0, 2.0)).toBe(2.0); - expect(multiply(0, 2.0)).toBe(0.0); - expect(multiply(2.0, 0)).toBe(0.0); - expect(multiply(-4, 2.0)).toBe(-8.0); -}); - -test('divide function', () => { - expect(divide(1, 2)).toBe(0.5); - expect(divide(1.0, 2.0)).toBe(0.5); - expect(divide(0, 2.0)).toBe(0); - expect(divide(-4, 2.0)).toBe(-2.0); - // expect(divide(2.0, 0)).toBe('Cannot divide by 0'); + expect(multiply(1, 2)).toBe(2); }); From 6c03226b02017384373f5c853eb804acadf7de39 Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 19:59:45 -0500 Subject: [PATCH 24/41] Delete .circleci directory --- .circleci/config.yml | 122 ------------------------------------------- 1 file changed, 122 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 8aaafe6..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,122 +0,0 @@ -version: 2.1 -orbs: - codecov: codecov/codecov@3 - - -jobs: - build2: - docker: - - image: cimg/base:stable - steps: - - run: - name: Create large dummy zip file (2MB) - command: | - mkdir -p dummy-data - dd if=/dev/urandom of=dummy-data/random.bin bs=1M count=2 - zip -r dummy-artifact222.zip dummy-data - - - store_artifacts: - path: dummy-artifact_not_exits.zip - destination: dummy-large-file - - - store_artifacts: - path: dummy-artifact222.zip - - build: - docker: - - image: cimg/node:current - steps: - - checkout - - - run: - name: Install dependencies - command: | - npm install --save-dev @babel/preset-env @babel/register - npm install - - - run: - name: Run tests and collect coverage - command: | - npx jest --coverage - sleep 5 - echo "Listing all files in the coverage directory:" - ls -R $CIRCLE_WORKING_DIRECTORY/coverage - find $CIRCLE_WORKING_DIRECTORY/coverage -type f - - - store_artifacts: - path: coverage/coverage-final.json - destination: coverage-report-json - - - store_artifacts: - path: coverage/lcov-report - destination: coverage-report-html - - - run: - name: Create large dummy zip file (2MB) - command: | - mkdir -p dummy-data - dd if=/dev/urandom of=dummy-data/random.bin bs=1M count=2 - zip -r dummy-artifact.zip dummy-data - - - store_artifacts: - path: dummy-artifact.zip - destination: dummy-large-file - - - run: - name: Create nested artifact structure with files at each level - command: | - base_path="/tmp/artifacts" - level1="$base_path/level1" - level2="$level1/level2" - level3="$level2/level3" - - mkdir -p "$level3" - - # Base64-encoded small valid PDF - pdf_base64="JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9UeXBlIC9DYXRhbG9nL1BhZ2VzIDIgMCBSCj4+CmVuZG9iagogMiAwIG9iago8PC9UeXBlIC9QYWdlcy9Db3VudCAxL0tpZHMgWzMgMCBSXQo+PgplbmRvYmoKMyAwIG9iago8PC9UeXBlIC9QYWdlL1BhcmVudCAyIDAgUi9NZWRpYUJveCBbMCAwIDMwMCAxNDRdL0NvbnRlbnRzIDQgMCBSCj4+CmVuZG9iago0IDAgb2JqCjw8L0xlbmd0aCA0NAo+PnN0cmVhbQpCVC9GMTggVGYgMTAgMTAwIFRkIChIZWxsbyBmcm9tIHNhZmUgYmFzZTY0KSBUaiBFVAplbmRzdHJlYW0KZW5kb2JqCnhyZWYKMCA1CjAwMDAwMDAwMDAgNjU1MzUgZgowMDAwMDAwMDEwIDAwMDAwIG4KMDAwMDAwMDA2MCAwMDAwMCBuCjAwMDAwMDAxMTcgMDAwMDAgbgowMDAwMDAwMjIwIDAwMDAwIG4KdHJhaWxlcgo8PC9Sb290IDEgMCBSL1NpemUgNQo+PgpzdGFydHhyZWYKMzE1CiUlRU9GCg==" - - for dir in "$level1" "$level2" "$level3"; do - mkdir -p "$dir" - echo "This is a text file in $dir" > "$dir/sample.txt" - zip -j "$dir/sample.zip" "$dir/sample.txt" - echo "$pdf_base64" | base64 -d > "$dir/sample.pdf" - done - - - store_artifacts: - path: /tmp/artifacts - destination: additional-artifacts-folder - - - codecov/upload - - - setup_remote_docker - - - run: - name: Generate Dockerfile - command: | - echo "FROM alpine" > Dockerfile - echo "WORKDIR /app" >> Dockerfile - echo "COPY coverage /app/coverage" >> Dockerfile - echo "COPY dummy-artifact.zip /app/" >> Dockerfile - echo "CMD [\"ls\", \"-lhR\", \"/app\"]" >> Dockerfile - - - run: - name: Build Docker image - command: | - docker build -t $DOCKERHUB_USERNAME/circleci-artifact-demo:$CIRCLE_SHA1 . - - - run: - name: Authenticate with Docker Hub - command: | - echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin - - - run: - name: Push Docker image - command: | - docker push $DOCKERHUB_USERNAME/circleci-artifact-demo:$CIRCLE_SHA1 - -workflows: - version: 2.1 - build-test: - jobs: - - build - - build2 From 6994cf8debf29dc230efc4ba3dfa1fed3acc06cb Mon Sep 17 00:00:00 2001 From: Nofar Bluestein Date: Thu, 12 Jun 2025 20:16:14 -0500 Subject: [PATCH 25/41] added logic --- app/mathUtils.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 app/mathUtils.js diff --git a/app/mathUtils.js b/app/mathUtils.js new file mode 100644 index 0000000..fa2b139 --- /dev/null +++ b/app/mathUtils.js @@ -0,0 +1,13 @@ +export function square(x) { + return x * x; + } + + export function cube(x) { + return x * x * x; + } + + export function factorial(n) { + if (n === 0) return 1; + return n * factorial(n - 1); + } + \ No newline at end of file From 79451a55861eda798955e6c209c7abb71362966c Mon Sep 17 00:00:00 2001 From: Nofar Bluestein Date: Thu, 12 Jun 2025 20:18:46 -0500 Subject: [PATCH 26/41] added tests --- app/mathUtils.test.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 app/mathUtils.test.js diff --git a/app/mathUtils.test.js b/app/mathUtils.test.js new file mode 100644 index 0000000..1345f9b --- /dev/null +++ b/app/mathUtils.test.js @@ -0,0 +1,14 @@ +import { expect, test } from 'vitest'; +import { square, cube, factorial } from './mathUtils'; + +test('square function', () => { + expect(square(2)).toBe(4); + expect(square(-3)).toBe(9); +}); + +test('cube function', () => { + expect(cube(2)).toBe(8); + expect(cube(-3)).toBe(-27); +}); + +// Intentionally leave factorial untested for now From 4de0ba9037767bb2c1ff06f4549884e03fdb64ac Mon Sep 17 00:00:00 2001 From: Nofar Bluestein Date: Thu, 12 Jun 2025 21:02:42 -0500 Subject: [PATCH 27/41] added tests --- app/{ => core}/calculator.js | 0 app/{ => core}/calculator.test.js | 0 app/{ => utils}/mathUtils.js | 0 app/{ => utils}/mathUtils.test.js | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename app/{ => core}/calculator.js (100%) rename app/{ => core}/calculator.test.js (100%) rename app/{ => utils}/mathUtils.js (100%) rename app/{ => utils}/mathUtils.test.js (100%) diff --git a/app/calculator.js b/app/core/calculator.js similarity index 100% rename from app/calculator.js rename to app/core/calculator.js diff --git a/app/calculator.test.js b/app/core/calculator.test.js similarity index 100% rename from app/calculator.test.js rename to app/core/calculator.test.js diff --git a/app/mathUtils.js b/app/utils/mathUtils.js similarity index 100% rename from app/mathUtils.js rename to app/utils/mathUtils.js diff --git a/app/mathUtils.test.js b/app/utils/mathUtils.test.js similarity index 100% rename from app/mathUtils.test.js rename to app/utils/mathUtils.test.js From 45c743bcadd0af4fd3b95d8147f192faccf040e2 Mon Sep 17 00:00:00 2001 From: Nofar Bluestein Date: Thu, 12 Jun 2025 21:33:14 -0500 Subject: [PATCH 28/41] added tests --- .github/workflows/ci.yml | 23 ++++++++++++++++++++++- vite.config.js | 3 +++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c38a4dd..dd26516 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Codecov CI with Vitest (final fully portable version) +name: Codecov CI with Vitest and Bundle Analysis on: [push, pull_request] @@ -19,10 +19,12 @@ jobs: run: | npm init -y npm install vitest@1.6.1 @vitest/coverage-v8@1.6.1 + npm install @codecov/vite-plugin@latest - name: Add test script manually run: | jq '.scripts.test="vitest run --coverage"' package.json > tmp.json && mv tmp.json package.json + jq '.scripts.build="vite build"' package.json > tmp.json && mv tmp.json package.json - name: Create vitest.config.ts run: | @@ -42,6 +44,25 @@ jobs: } })" > vitest.config.ts + - name: Create vite.config.js (for Codecov Bundle Analysis) + run: | + echo "import { defineConfig } from 'vite'; + import { codecovVitePlugin } from '@codecov/vite-plugin'; + export default defineConfig({ + plugins: [ + codecovVitePlugin({ + enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined, + bundleName: 'example-javascript', + uploadToken: process.env.CODECOV_TOKEN + }) + ] + })" > vite.config.js + + - name: Build app for bundle analysis + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} + run: npm run build + - name: Run tests with coverage run: npm run test || true diff --git a/vite.config.js b/vite.config.js index 7b820a5..686dd68 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,4 +1,6 @@ import { defineConfig } from 'vitest/config' +import { defineConfig } from "vite"; + export default defineConfig({ test: { @@ -10,3 +12,4 @@ export default defineConfig({ } } }) + From 630785f4e284accf9a252ebe1ab378bc912d731e Mon Sep 17 00:00:00 2001 From: Nofar Bluestein Date: Thu, 12 Jun 2025 21:36:46 -0500 Subject: [PATCH 29/41] added bundle --- index.html | 0 main.js | 2 ++ 2 files changed, 2 insertions(+) create mode 100644 index.html create mode 100644 main.js diff --git a/index.html b/index.html new file mode 100644 index 0000000..e69de29 diff --git a/main.js b/main.js new file mode 100644 index 0000000..d0d64b0 --- /dev/null +++ b/main.js @@ -0,0 +1,2 @@ +import { square } from './app/mathUtils.js'; +console.log(square(5)); From 61cd6b45ef95638fdb3be71b9df0969fae449137 Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 12 Jun 2025 21:40:06 -0500 Subject: [PATCH 30/41] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6de9928..aaa07b0 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ For more information, please see the links below. - [Community Boards](https://community.codecov.io) - [Support](https://codecov.io/support) - [Documentation](https://docs.codecov.io) - + ## License [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcodecov%2Fexample-javascript.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fexample-javascript?ref=badge_large) From fe13f66859068f567f75716ca391494d30a25f8d Mon Sep 17 00:00:00 2001 From: nofarb Date: Fri, 13 Jun 2025 01:14:49 -0500 Subject: [PATCH 31/41] Update ci.yml --- .github/workflows/ci.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd26516..3a6fea6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Codecov CI with Vitest and Bundle Analysis +name: Codecov CI with Vitest and Bundle Analysis + SonarQube on: [push, pull_request] @@ -79,3 +79,21 @@ jobs: uses: codecov/test-results-action@v1 with: token: ${{ secrets.CODECOV_ORG_TOKEN }} + + - name: Install SonarQube scanner + run: npm install -g sonarqube-scanner + + - name: Create sonar-project.properties + run: | + cat < sonar-project.properties + sonar.projectKey=example-javascript + sonar.sources=app + sonar.javascript.lcov.reportPaths=coverage/lcov.info + sonar.host.url=${{ secrets.SONAR_HOST_URL }} + EOF + + - name: Run SonarQube scanner + run: sonar-scanner + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} From b25b4fb64d1e851d4cb96345d6e4bb37b90f58c1 Mon Sep 17 00:00:00 2001 From: nofarb Date: Fri, 13 Jun 2025 01:18:02 -0500 Subject: [PATCH 32/41] tru sonar --- .github/workflows/ci.yml | 63 ++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a6fea6..8b68e79 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Codecov CI with Vitest and Bundle Analysis + SonarQube +name: Codecov CI with Vitest and SonarQube on: [push, pull_request] @@ -19,9 +19,10 @@ jobs: run: | npm init -y npm install vitest@1.6.1 @vitest/coverage-v8@1.6.1 - npm install @codecov/vite-plugin@latest + # Optional: only install Codecov bundle plugin if you want bundle analysis: + # npm install @codecov/vite-plugin@latest - - name: Add test script manually + - name: Add test & build scripts manually run: | jq '.scripts.test="vitest run --coverage"' package.json > tmp.json && mv tmp.json package.json jq '.scripts.build="vite build"' package.json > tmp.json && mv tmp.json package.json @@ -44,24 +45,26 @@ jobs: } })" > vitest.config.ts - - name: Create vite.config.js (for Codecov Bundle Analysis) - run: | - echo "import { defineConfig } from 'vite'; - import { codecovVitePlugin } from '@codecov/vite-plugin'; - export default defineConfig({ - plugins: [ - codecovVitePlugin({ - enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined, - bundleName: 'example-javascript', - uploadToken: process.env.CODECOV_TOKEN - }) - ] - })" > vite.config.js - - - name: Build app for bundle analysis - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} - run: npm run build + # Uncomment this block if you eventually want bundle analysis enabled again: + # + # - name: Create vite.config.js (for Codecov Bundle Analysis) + # run: | + # echo "import { defineConfig } from 'vite'; + # import { codecovVitePlugin } from '@codecov/vite-plugin'; + # export default defineConfig({ + # plugins: [ + # codecovVitePlugin({ + # enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined, + # bundleName: 'example-javascript', + # uploadToken: process.env.CODECOV_TOKEN + # }) + # ] + # })" > vite.config.js + + # - name: Build app for bundle analysis + # env: + # CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} + # run: npm run build - name: Run tests with coverage run: npm run test || true @@ -83,17 +86,13 @@ jobs: - name: Install SonarQube scanner run: npm install -g sonarqube-scanner - - name: Create sonar-project.properties - run: | - cat < sonar-project.properties - sonar.projectKey=example-javascript - sonar.sources=app - sonar.javascript.lcov.reportPaths=coverage/lcov.info - sonar.host.url=${{ secrets.SONAR_HOST_URL }} - EOF - - name: Run SonarQube scanner - run: sonar-scanner + run: | + sonar-scanner \ + -Dsonar.projectKey=example-javascript \ + -Dsonar.sources=app \ + -Dsonar.javascript.lcov.reportPaths=coverage/lcov.info \ + -Dsonar.host.url=${{ vars.SONAR_HOST_URL }} env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }} From c8496d3df1736439838f37dd87544a324ce65343 Mon Sep 17 00:00:00 2001 From: nofarb Date: Fri, 13 Jun 2025 01:18:47 -0500 Subject: [PATCH 33/41] Delete .github/workflows/enforce-license-compliance.yml --- .github/workflows/enforce-license-compliance.yml | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 .github/workflows/enforce-license-compliance.yml diff --git a/.github/workflows/enforce-license-compliance.yml b/.github/workflows/enforce-license-compliance.yml deleted file mode 100644 index 538d029..0000000 --- a/.github/workflows/enforce-license-compliance.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Enforce License Compliance - -on: - - -jobs: - enforce-license-compliance: - runs-on: ubuntu-latest - steps: - - name: 'Enforce License Compliance' - uses: getsentry/action-enforce-license-compliance@57ba820387a1a9315a46115ee276b2968da51f3d # main - with: - fossa_api_key: ${{ secrets.FOSSA_API_KEY }} From df8d8571ae0b82b70cc17aa0e922b5406319c82f Mon Sep 17 00:00:00 2001 From: nofarb Date: Fri, 13 Jun 2025 01:23:28 -0500 Subject: [PATCH 34/41] fix sonar integration --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b68e79..45604bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,6 +91,7 @@ jobs: sonar-scanner \ -Dsonar.projectKey=example-javascript \ -Dsonar.sources=app \ + -Dsonar.organization=nofarb \ -Dsonar.javascript.lcov.reportPaths=coverage/lcov.info \ -Dsonar.host.url=${{ vars.SONAR_HOST_URL }} env: From ec47494a272242d4f58ba56043c4a9a9180a4ec6 Mon Sep 17 00:00:00 2001 From: nofarb Date: Fri, 13 Jun 2025 01:26:23 -0500 Subject: [PATCH 35/41] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45604bf..65f7707 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,7 +89,7 @@ jobs: - name: Run SonarQube scanner run: | sonar-scanner \ - -Dsonar.projectKey=example-javascript \ + -Dsonar.projectKey=nofarb_example-javascript \ -Dsonar.sources=app \ -Dsonar.organization=nofarb \ -Dsonar.javascript.lcov.reportPaths=coverage/lcov.info \ From f477afcaf882cdac54e4ec04010717b9092e27b8 Mon Sep 17 00:00:00 2001 From: Nofar Bluestein Date: Fri, 13 Jun 2025 01:37:13 -0500 Subject: [PATCH 36/41] fix sonar --- .github/workflows/ci.yml | 18 ++++-------------- sonar-project.properties | 0 2 files changed, 4 insertions(+), 14 deletions(-) create mode 100644 sonar-project.properties diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 65f7707..86de584 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,18 +82,8 @@ jobs: uses: codecov/test-results-action@v1 with: token: ${{ secrets.CODECOV_ORG_TOKEN }} - - - name: Install SonarQube scanner - run: npm install -g sonarqube-scanner - - - name: Run SonarQube scanner - run: | - sonar-scanner \ - -Dsonar.projectKey=nofarb_example-javascript \ - -Dsonar.sources=app \ - -Dsonar.organization=nofarb \ - -Dsonar.javascript.lcov.reportPaths=coverage/lcov.info \ - -Dsonar.host.url=${{ vars.SONAR_HOST_URL }} + + - name: SonarQube Scan + uses: SonarSource/sonarqube-scan-action@v5 env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..e69de29 From b4959ead826b2f9d67ee0b1c1f53f27779ea1fed Mon Sep 17 00:00:00 2001 From: Nofar Bluestein Date: Fri, 13 Jun 2025 01:41:38 -0500 Subject: [PATCH 37/41] fix sonar --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 86de584..5d86bdf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,4 +86,6 @@ jobs: - name: SonarQube Scan uses: SonarSource/sonarqube-scan-action@v5 env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + sonar.projectKey: "nofarb_example-javascript" + sonar.organization: "nofarb" \ No newline at end of file From 1a3fa1a8a1c4e1d4eb357ca0163e95fe0fc8993b Mon Sep 17 00:00:00 2001 From: Nofar Bluestein Date: Fri, 13 Jun 2025 01:45:17 -0500 Subject: [PATCH 38/41] fix sonar --- .github/workflows/ci.yml | 8 ++++++-- sonar-project.properties | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d86bdf..3fbff82 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,7 +85,11 @@ jobs: - name: SonarQube Scan uses: SonarSource/sonarqube-scan-action@v5 + with: + args: > + -Dsonar.projectKey=nofarb_example-javascript + -Dsonar.organization=nofarb + -Dsonar.verbose=true env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - sonar.projectKey: "nofarb_example-javascript" - sonar.organization: "nofarb" \ No newline at end of file + \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties index e69de29..ab2a981 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -0,0 +1,17 @@ +sonar.projectKey=nofarb_example-javascript +sonar.organization=nofarb +sonar.sources=. +sonar.language=js +sonar.sourceEncoding=UTF-8 + + +# This is the name and version displayed in the SonarCloud UI. +#sonar.projectName=example-javascript +#sonar.projectVersion=1.0 + + +# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. +#sonar.sources=. + +# Encoding of the source code. Default is default system encoding +#sonar.sourceEncoding=UTF-8 \ No newline at end of file From 80ccc07431b0741b9995b8225dbf76a713fa3e6f Mon Sep 17 00:00:00 2001 From: nofarb Date: Wed, 25 Mar 2026 17:45:19 -0500 Subject: [PATCH 39/41] Add CircleCI configuration for machine inspection job --- .circleci/config.yml | 76 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..f41e4a5 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,76 @@ +version: 2.1 + +jobs: + inspect-gen2-large: + machine: + image: ubuntu-2004:current + resource_class: large + steps: + - run: + name: Inspect machine details + command: | + set -euxo pipefail + + echo "=== Basic OS info ===" + uname -a + cat /etc/os-release || true + + echo + echo "=== CPU / memory ===" + nproc || true + lscpu || true + free -h || true + + echo + echo "=== Block devices ===" + lsblk || true + + echo + echo "=== DMI / virtualization hints ===" + sudo dmidecode -s system-manufacturer || true + sudo dmidecode -s system-product-name || true + sudo dmidecode -s bios-vendor || true + systemd-detect-virt || true + + echo + echo "=== Hypervisor / kernel messages ===" + dmesg | egrep -i 'hypervisor|kvm|xen|nitro|google|amazon|gcp|aws' | tail -50 || true + + echo + echo "=== Cloud metadata probes ===" + echo "--- AWS IMDS ---" + TOKEN=$(curl -sS -m 2 -X PUT "http://169.254.169.254/latest/api/token" \ + -H "X-aws-ec2-metadata-token-ttl-seconds: 60" || true) + if [ -n "${TOKEN:-}" ]; then + echo "AWS metadata reachable" + curl -sS -m 2 -H "X-aws-ec2-metadata-token: $TOKEN" \ + http://169.254.169.254/latest/meta-data/instance-type || true + curl -sS -m 2 -H "X-aws-ec2-metadata-token: $TOKEN" \ + http://169.254.169.254/latest/dynamic/instance-identity/document || true + else + echo "AWS metadata not reachable" + fi + + echo + echo "--- GCP metadata ---" + if curl -sS -m 2 -H "Metadata-Flavor: Google" \ + http://metadata.google.internal/computeMetadata/v1/instance/machine-type >/dev/null 2>&1; then + echo "GCP metadata reachable" + curl -sS -m 2 -H "Metadata-Flavor: Google" \ + http://metadata.google.internal/computeMetadata/v1/instance/machine-type || true + curl -sS -m 2 -H "Metadata-Flavor: Google" \ + http://metadata.google.internal/computeMetadata/v1/instance/cpu-platform || true + curl -sS -m 2 -H "Metadata-Flavor: Google" \ + http://metadata.google.internal/computeMetadata/v1/project/project-id || true + else + echo "GCP metadata not reachable" + fi + + echo + echo "=== Summary ===" + echo "resource_class=large.gen2" + +workflows: + inspect: + jobs: + - inspect-gen2-large From cf781f44b3fbf051c917b479ad81b0ee564c8ea1 Mon Sep 17 00:00:00 2001 From: nofarb Date: Wed, 25 Mar 2026 17:52:31 -0500 Subject: [PATCH 40/41] Update resource class to large.gen2 in CircleCI config --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f41e4a5..32cd293 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,7 @@ jobs: inspect-gen2-large: machine: image: ubuntu-2004:current - resource_class: large + resource_class: large.gen2 steps: - run: name: Inspect machine details From aba79daea605dba64f4e9f15ff629ef5b622d16d Mon Sep 17 00:00:00 2001 From: nofarb Date: Wed, 25 Mar 2026 17:53:36 -0500 Subject: [PATCH 41/41] Update CircleCI config for Ubuntu version and resource class --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 32cd293..f42af42 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,8 +3,8 @@ version: 2.1 jobs: inspect-gen2-large: machine: - image: ubuntu-2004:current - resource_class: large.gen2 + image: ubuntu-2404:current + resource_class: medium.gen2 steps: - run: name: Inspect machine details