Skip to content

Commit 85e8d4f

Browse files
rohanKanojiamanusa
authored andcommitted
Add Github Action workflow for Windows build
Windows tests were fixed in #3244, let's add a github action workflow for windows builds so that we don't break tests on windows again Signed-off-by: Rohan Kumar <rohaan@redhat.com>
1 parent 252b562 commit 85e8d4f

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

.github/workflows/windows-build.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#
2+
# Copyright (C) 2015 Red Hat, Inc.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
name: Windows Build
18+
19+
on:
20+
push:
21+
branches:
22+
- master
23+
pull_request:
24+
25+
jobs:
26+
build:
27+
name: Java ${{ matrix.java }} Maven
28+
runs-on: windows-latest
29+
strategy:
30+
matrix:
31+
java: [11]
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v2
35+
- name: Setup Java
36+
uses: actions/setup-java@v1
37+
with:
38+
java-version: ${{ matrix.java }}
39+
- name: Build Project
40+
run: mvn clean install
41+

uberjar/src/test/java/io/fabric8/kubernetes/clnt/UberJarTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ private String getMinorVersion(String projectVersion) {
159159
}
160160

161161
private File getFileInDirectory(File parentFile, String pathToFile) {
162-
pathToFile = pathToFile.replaceAll("/", File.separator);
162+
String toReplaceChar = File.separator.equals("/") ? File.separator : "\\\\";
163+
pathToFile = pathToFile.replaceAll("/", toReplaceChar);
163164
return new File(parentFile, pathToFile);
164165
}
165166

0 commit comments

Comments
 (0)