Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

chore: add windows machine in ci #86

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
# Copyright (c) 2020 Reficio (TM) - Reestablish your software! All Rights Reserved.
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on:
Expand All @@ -27,8 +7,8 @@ on:
branches: [ main ]

jobs:
build:
name: "JDK 21 Eclipse Temurin"
linux-build:
name: "JDK 21 Eclipse Temurin Linux"
runs-on: ubuntu-latest
container: "maven:3.9.6-eclipse-temurin-21"
steps:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would a custom container be needed? Isn't the default option enough?
Also, removing this container and using a run matrix will remove duplication for linux and windows runs

Expand All @@ -51,4 +31,24 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./rewrite-testcontainers-gitserver/target/site/jacoco/jacoco.xml, ./testcontainers-gitserver/target/site/jacoco/jacoco.xml
fail_ci_if_error: true
verbose: false
verbose: false
windows-build:
name: "JDK 21 Eclipse Temurin Windows"
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use cache: maven setting in actions/setup-java instead

with:
path: ~/.m2/repository
key: maven-jdk17-windows-${{ hashFiles('**/pom.xml') }}
restore-keys: maven-jdk17
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- uses: stCarolas/setup-maven@v5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer the use of the Maven wrapper and set it up in the project instead

with:
maven-version: 3.9.6
- name: 'Build'
run: |
mvn --fail-at-end --batch-mode --no-transfer-progress clean verify
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to invoke clean after a fresh checkout

Loading