Skip to content

Commit 3d1b8c6

Browse files
committed
[dotnet] run tests on Windows CI
1 parent a8f4184 commit 3d1b8c6

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/ci-dotnet.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: 'CI - .NET'
2+
3+
on:
4+
workflow_dispatch:
5+
6+
schedule:
7+
- cron: '10 9,21 * * *'
8+
9+
push:
10+
11+
pull_request:
12+
13+
jobs:
14+
check_workflow:
15+
permissions:
16+
contents: none
17+
uses: ./.github/workflows/should-workflow-run.yml
18+
with:
19+
bazel-target-prefix: '//dotnet'
20+
21+
browser-test:
22+
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run dotnet]') == true }}
23+
needs: check_workflow
24+
runs-on: 'windows-latest'
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
driver: [ Chrome, Firefox ]
29+
include:
30+
- driver: Chrome
31+
location: 'C:\SeleniumWebDrivers\ChromeDriver'
32+
- driver: Firefox
33+
location: 'C:\SeleniumWebDrivers\GeckoDriver'
34+
steps:
35+
- name: Checkout source tree
36+
uses: actions/checkout@v3
37+
- name: Setup Java
38+
uses: actions/setup-java@v3
39+
with:
40+
java-version: 11
41+
distribution: 'adopt'
42+
- name: Cache Bazel artifacts
43+
uses: ./.github/actions/cache-bazel
44+
with:
45+
workflow: dotnet
46+
key: ${{ matrix.driver }}
47+
- name: Setup dotnet tests
48+
uses: ./.github/actions/bazel
49+
with:
50+
command: build //dotnet/test/common:chrome
51+
- name: Run ${{ matrix.driver }} tests
52+
working-directory: dotnet
53+
run: dotnet test test/common/WebDriver.Common.Tests.csproj
54+
env:
55+
ACTIVE_DRIVER_CONFIG: ${{ matrix.driver }}
56+
DRIVER_SERVICE_LOCATION: ${{ matrix.location }}

0 commit comments

Comments
 (0)