Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

ci: run Sonar pipeline in macos #5972

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
name: Sonar Scanner

env:
MAVEN_ARGS: -B -C -V -ntp -Dhttp.keepAlive=false -e
MAVEN_OPTIONS: -B -C -V -ntp -Dhttp.keepAlive=false -e

on:
push:
Expand All @@ -40,7 +40,7 @@ permissions:
jobs:
sonar:
name: Sonar
runs-on: ubuntu-latest
runs-on: macos-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_LOGIN_TOKEN: ${{ secrets.SONAR_LOGIN_TOKEN }}
Expand All @@ -55,5 +55,5 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
- name: Maven Sonar
run: ./mvnw ${MAVEN_ARGS} clean install sonar:sonar -Psonar
- name: Sonar
run: make clean sonar
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

MAVEN_OPTIONS=
MAVEN_OPTIONS ?=

.PHONY: clean-java
clean-java:
Expand All @@ -26,3 +26,7 @@ clean: clean-java
.PHONY: generate-model
generate-model:
cd kubernetes-model-generator && ./generateModel.sh

.PHONY: sonar
sonar:
mvn $(MAVEN_OPTIONS) clean install sonar:sonar -Psonar
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@

import io.fabric8.kubernetes.client.http.AbstractSimultaneousConnectionsTest;
import io.fabric8.kubernetes.client.http.HttpClient;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;

@SuppressWarnings("java:S2187")
@DisabledOnOs(OS.MAC) // TODO: Enable when OkHttp 4
public class OkHttpSimultaneousConnectionsTest extends AbstractSimultaneousConnectionsTest {
@Override
protected HttpClient.Factory getHttpClientFactory() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnJre;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;
import org.junit.jupiter.api.io.TempDir;
import org.mockito.ArgumentCaptor;

Expand Down Expand Up @@ -299,6 +301,7 @@ void longFileNamesSupported() throws Exception {
}

@DisabledOnJre(JAVA_21)
@DisabledOnOs(OS.MAC) // TODO: find another way to verify POSIX is enabled
@Test
@DisplayName("Big numbers supported (POSIX)")
void bigNumbersSupported(@TempDir Path tempDir) throws Exception {
Expand Down