Skip to content

Commit 6153f22

Browse files
alexeaglethesayyn
authored andcommitted
ci: add windows coverage
1 parent 9f0079b commit 6153f22

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

.bcr/presubmit.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ bcr_test_module:
33
matrix:
44
bazel: ["6.x", "7.x"]
55
# TODO(#97): add windows
6-
platform: ["debian10", "ubuntu2004"]
6+
platform: ["debian10", "ubuntu2004", "windows"]
77
tasks:
88
test_linux:
99
name: "Run test module"

.github/workflows/ci.yaml

+16-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,13 @@ jobs:
4343
run: echo "os=macos-13" >> $GITHUB_OUTPUT
4444
# Don't run MacOS if there is no TestContainers API token which is the case on forks. We need it for container tests.
4545
if: ${{ env.TC_CLOUD_TOKEN != '' }}
46+
- id: windows
47+
run: echo "os=windows-latest" >> $GITHUB_OUTPUT
48+
# Only run on main branch (not PRs) to minimize windows minutes (billed at 2X)
49+
# https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#included-storage-and-minutes
50+
if: (github.ref == 'refs/heads/main' || contains(github.head_ref, 'windows'))
4651
outputs:
47-
# Will look like ["ubuntu-latest", "macos-13"]
52+
# Will look like ["ubuntu-latest", "macos-latest", "windows-latest"]
4853
os: ${{ toJSON(steps.*.outputs.os) }}
4954

5055
test:
@@ -77,9 +82,18 @@ jobs:
7782
# e2e/assertion is bzlmod only but it has test for both cases.
7883
- folder: e2e/assertion
7984
bzlmodEnabled: false
85+
# Windows is mostly broken, so we allow-list below instead.
86+
- os: windows-latest
87+
bzlmodEnabled: false
8088
# TODO: fix
8189
- folder: e2e/wasm
8290
bzlmodEnabled: true
91+
include:
92+
# This is approx. what the BCR presubmit will run
93+
- os: windows-latest
94+
bzlmodEnabled: true
95+
folder: e2e/smoke
96+
8397
# Steps represent a sequence of tasks that will be executed as part of the job
8498
steps:
8599
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
@@ -162,7 +176,7 @@ jobs:
162176
XDG_CACHE_HOME: ~/.cache/bazel-repo
163177
run: |
164178
bazel \
165-
--bazelrc=$GITHUB_WORKSPACE/.github/workflows/ci.bazelrc \
179+
--bazelrc=${{ github.workspace }}/.github/workflows/ci.bazelrc \
166180
--bazelrc=.bazelrc \
167181
test //... \
168182
${{ steps.set_bzlmod_flag.outputs.bzlmod_flag }} \

0 commit comments

Comments
 (0)