summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorTommaso Sciortino <[email protected]>2025-07-25 15:57:30 -0700
committerGitHub <[email protected]>2025-07-25 15:57:30 -0700
commit17331001a0ac10212097c50797eda287296bf27a (patch)
tree5854b23caa665f4567223f951758dfed71788fac /.github
parentfbdc8d5ab3f76aef32af6a8f516d97771c56a7ac (diff)
Run presubmit tests in windows as well as linux. (#4672)
Co-authored-by: matt korwel <[email protected]>
Diffstat (limited to '.github')
-rw-r--r--.github/actions/post-coverage-comment/action.yml5
-rw-r--r--.github/workflows/ci.yml18
2 files changed, 16 insertions, 7 deletions
diff --git a/.github/actions/post-coverage-comment/action.yml b/.github/actions/post-coverage-comment/action.yml
index 20b67019..10a4afeb 100644
--- a/.github/actions/post-coverage-comment/action.yml
+++ b/.github/actions/post-coverage-comment/action.yml
@@ -17,6 +17,9 @@ inputs:
node_version:
description: 'Node.js version for context in messages'
required: true
+ os:
+ description: 'The os for context in messages'
+ required: true
github_token:
description: 'GitHub token for posting comments'
required: true
@@ -91,7 +94,7 @@ runs:
echo "</details>" >> "$comment_file"
echo "" >> "$comment_file"
- echo "_For detailed HTML reports, please see the 'coverage-reports-${{ inputs.node_version }}' artifact from the main CI run._" >> "$comment_file"
+ echo "_For detailed HTML reports, please see the 'coverage-reports-${{ inputs.node_version }}-${{ inputs.os }}' artifact from the main CI run._" >> "$comment_file"
- name: Post Coverage Comment
uses: thollander/actions-comment-pull-request@v3
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 6846d4b5..e00b1f71 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -44,7 +44,7 @@ jobs:
test:
name: Test
- runs-on: ubuntu-latest
+ runs-on: ${{ matrix.os }}
needs: lint
permissions:
contents: read
@@ -52,6 +52,7 @@ jobs:
pull-requests: write
strategy:
matrix:
+ os: [ubuntu-latest, windows-latest]
node-version: [20.x, 22.x, 24.x]
steps:
- name: Checkout repository
@@ -70,7 +71,9 @@ jobs:
run: npm ci # Install fresh dependencies using the downloaded package-lock.json
- name: Run tests and generate reports
- run: NO_COLOR=true npm run test:ci
+ run: npm run test:ci
+ env:
+ NO_COLOR: true
- name: Publish Test Report (for non-forks)
if: always() && (github.event.pull_request.head.repo.full_name == github.repository)
@@ -85,14 +88,14 @@ jobs:
if: always() && (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
- name: test-results-fork-${{ matrix.node-version }}
+ name: test-results-fork-${{ matrix.node-version }}-${{ matrix.os }}
path: packages/*/junit.xml
- name: Upload coverage reports
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
- name: coverage-reports-${{ matrix.node-version }}
+ name: coverage-reports-${{ matrix.node-version }}-${{ matrix.os }}
path: packages/*/coverage
post_coverage_comment:
@@ -106,7 +109,9 @@ jobs:
pull-requests: write # For commenting
strategy:
matrix:
- node-version: [22.x] # Reduce noise by only posting the comment once
+ # Reduce noise by only posting the comment once
+ os: [ubuntu-latest]
+ node-version: [22.x]
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
@@ -114,7 +119,7 @@ jobs:
- name: Download coverage reports artifact
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
- name: coverage-reports-${{ matrix.node-version }}
+ name: coverage-reports-${{ matrix.node-version }}-${{ matrix.os }}
path: coverage_artifact # Download to a specific directory
- name: Post Coverage Comment using Composite Action
@@ -125,6 +130,7 @@ jobs:
cli_full_text_summary_file: coverage_artifact/cli/coverage/full-text-summary.txt
core_full_text_summary_file: coverage_artifact/core/coverage/full-text-summary.txt
node_version: ${{ matrix.node-version }}
+ os: ${{ matrix.os }}
github_token: ${{ secrets.GITHUB_TOKEN }}
codeql: