Skip to content

Commit 7eb8ca6

Browse files
Merge pull request #8 from RishiKumarRay/main
Configure GH Actions CI to run tests and build on Windows machines
2 parents 81e077d + bb799ae commit 7eb8ca6

File tree

1 file changed

+9
-17
lines changed

1 file changed

+9
-17
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,30 +24,22 @@ on:
2424

2525
jobs:
2626
build:
27-
28-
runs-on: ubuntu-latest
29-
27+
runs-on: ${{ matrix.os }}
28+
strategy:
29+
matrix:
30+
os: [ubuntu-latest, windows-latest]
3031
steps:
31-
- uses: actions/checkout@v2
32+
- name: Prepare git
33+
run: git config --global core.autocrlf false
34+
if: startsWith(matrix.os, 'windows')
3235

36+
- uses: actions/checkout@v2
3337
- name: Set up JDK 11
3438
uses: actions/setup-java@v2
3539
with:
3640
distribution: temurin
3741
java-version: 11
38-
39-
- name: Get Date
40-
id: get-date
41-
run: |
42-
echo "::set-output name=date::$(/bin/date -u "+%Y-%m")"
43-
shell: bash
44-
- name: Cache Maven Repository
45-
id: cache-maven
46-
uses: actions/cache@v2
47-
with:
48-
path: ~/.m2/repository
49-
# refresh cache every month to avoid unlimited growth
50-
key: maven-repo-${{ runner.os }}-${{ steps.get-date.outputs.date }}
42+
cache: 'maven'
5143

5244
- name: Build with Maven
5345
run: mvn -B formatter:validate verify --file pom.xml

0 commit comments

Comments
 (0)