Skip to content

Commit b53856b

Browse files
authored
Merge pull request iluwatar#1509 from ohbus/master
Cleaning up unnecessary code from the CI yaml and CI server version upgrade
2 parents 8afe4c3 + 1973d1b commit b53856b

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

.github/workflows/maven-ci.yml

+4-7
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ on:
3333
jobs:
3434
build:
3535

36-
runs-on: ubuntu-18.04
36+
runs-on: ubuntu-20.04
3737

3838
steps:
3939
- uses: actions/checkout@v2
@@ -49,14 +49,11 @@ jobs:
4949
${{ runner.os }}-maven-
5050
# Some tests need screen access
5151
- name: Install xvfb
52-
run: sudo apt-get install xvfb
53-
# SonarQube scan does not work for forked repositories
52+
run: sudo apt-get install -y xvfb
53+
# The SonarQube analysis is only for the master branch of the main repository.
54+
# SonarQube scan does not work for forked repositories try changing it to xvfb-run mvn clean verify
5455
# See https://jira.sonarsource.com/browse/MMF-1371
55-
- name: Build with Maven
56-
if: github.ref != 'refs/heads/master'
57-
run: xvfb-run mvn clean verify
5856
- name: Build with Maven and run SonarQube analysis
59-
if: github.ref == 'refs/heads/master'
6057
run: xvfb-run mvn clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
6158
env:
6259
# These two env variables are needed for sonar analysis

.github/workflows/maven-pr-builder.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ on:
3333
jobs:
3434
build:
3535

36-
runs-on: ubuntu-18.04
36+
runs-on: ubuntu-20.04
3737

3838
steps:
3939
- uses: actions/checkout@v2
@@ -49,9 +49,9 @@ jobs:
4949
${{ runner.os }}-maven-
5050
# Some tests need screen access
5151
- name: Install xvfb
52-
run: sudo apt-get install xvfb
53-
# SonarQube scan does not work for forked repositories
52+
run: sudo apt-get install -y xvfb
53+
# This worflow is only for building Pull Requests, the master branch runs Sonar analysis on the main repository.
54+
# SonarQube scan does not work for forked repositories.
5455
# See https://jira.sonarsource.com/browse/MMF-1371
5556
- name: Build with Maven
56-
if: github.ref != 'refs/heads/master'
5757
run: xvfb-run mvn clean verify

0 commit comments

Comments
 (0)