Skip to content

Commit

Permalink
Cleanup validate workflow (helidon-io#9108)
Browse files Browse the repository at this point in the history
* Cleanup validate workflow.

- Remove 'pipeline' Maven profile
- Add -B -fae -e to MAVEN_ARGS
- Remove usage of -Dmaven.test.skip=true (breaks tests jars)
- Use -T for prime builds
- Remove HELIDON_PIPELINES environment variable
- Update example scripts to use https URL instead of SSH, use MAVEN_ARGS
  • Loading branch information
romain-grecourt authored Aug 7, 2024
1 parent fbba2c2 commit a07579b
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 95 deletions.
61 changes: 29 additions & 32 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ name: "Validate"
on:
pull_request:
push:
branches-ignore: [ 'main', 'helidon-*.x' ]
branches-ignore: [ 'main', 'helidon-*.x', 'release-*' ]
tags-ignore: [ '**' ]
workflow_call:

env:
JAVA_VERSION: '21'
JAVA_DISTRO: 'oracle'
HELIDON_PIPELINES: 'true'
MAVEN_ARGS: |
-B -fae -e
-Dmaven.wagon.httpconnectionManager.ttlSeconds=60
-Dmaven.wagon.http.retryHandler.count=3
Expand Down Expand Up @@ -74,7 +75,7 @@ jobs:
mvn ${MAVEN_ARGS} -e \
-DskipTests \
-Dmaven.test.skip=true \
-Pspotbugs,pipeline \
-Pspotbugs \
install
docs:
timeout-minutes: 30
Expand All @@ -89,12 +90,10 @@ jobs:
cache: maven
- name: Docs
run: |
mvn ${MAVEN_ARGS} -e \
-Dmaven.test.skip=true \
mvn ${MAVEN_ARGS} \
-DskipTests \
-Ppipeline \
install
mvn ${MAVEN_ARGS} -e \
mvn ${MAVEN_ARGS} \
-f docs/pom.xml \
-Pjavadoc \
install
Expand All @@ -114,9 +113,9 @@ jobs:
cache: maven
- name: Maven build
run: |
mvn ${MAVEN_ARGS} -e \
mvn ${MAVEN_ARGS} \
-Dmaven.test.failure.ignore=false \
-Pjavadoc,sources,tests,pipeline \
-Pjavadoc,sources,tests \
install
examples:
timeout-minutes: 40
Expand All @@ -142,29 +141,22 @@ jobs:
- name: Maven build
run: |
# prime build
mvn ${MAVEN_ARGS} -e \
-Dmaven.test.skip=true \
mvn ${MAVEN_ARGS} -T8 \
-DskipTests \
-Ppipeline \
install
- name: Examples checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
repository: helidon-io/helidon-examples.git
ref: dev-4.x
path: helidon-examples
- name: Examples build
run: etc/scripts/build-examples.sh
- name: Test quickstarts native image
run: etc/scripts/test-quickstarts.sh
mp-tck:
timeout-minutes: 60
name: "MicroProfile TCKs"
strategy:
matrix:
os: [ ubuntu-20.04 ]
include:
- { os: ubuntu-20.04, platform: linux }
runs-on: ${{ matrix.os }}
name: tests/tck-${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION }}
Expand All @@ -176,12 +168,10 @@ jobs:
- name: Maven build
run: |
# prime build
mvn ${MAVEN_ARGS} -e \
-Dmaven.test.skip=true \
mvn ${MAVEN_ARGS} -T8 \
-DskipTests \
-Ppipeline \
install
mvn ${MAVEN_ARGS} -e \
mvn ${MAVEN_ARGS} \
-f microprofile/tests/tck/pom.xml \
-Ptck-ft \
verify
Expand All @@ -202,10 +192,8 @@ jobs:
- name: Test archetypes
run: |
# prime build
mvn ${MAVEN_ARGS} -e \
-Dmaven.test.skip=true \
mvn ${MAVEN_ARGS} -T8 \
-DskipTests \
-Ppipeline \
install
mvn ${MAVEN_ARGS} -e \
-f archetypes/pom.xml \
Expand Down Expand Up @@ -240,7 +228,7 @@ jobs:
- name: Build Helidon
run: |
# prime build
mvn ${MAVEN_ARGS} -e \
mvn ${MAVEN_ARGS} -T4 \
-DskipTests \
-Ptests \
install
Expand Down Expand Up @@ -281,7 +269,7 @@ jobs:
- name: Build Helidon
run: |
# prime build
mvn ${MAVEN_ARGS} -e \
mvn ${MAVEN_ARGS} -T4 \
-DskipTests \
-Ptests \
install
Expand All @@ -297,10 +285,13 @@ jobs:
timeout-minutes: 60
strategy:
matrix:
os: [ ubuntu-20.04 ]
group: [ oracle, others ]
include:
- { group: others, modules: '!oracle' }
runs-on: ubuntu-20.04
- { os: ubuntu-20.04, platform: linux }
runs-on: ${{ matrix.os }}
name: tests/dbclient-${{ matrix.group }}-${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION }}
Expand All @@ -309,16 +300,22 @@ jobs:
distribution: ${{ env.JAVA_DISTRO }}
java-version: ${{ env.JAVA_VERSION }}
cache: maven
- name: Free Space
shell: bash
run: |
# See https://github.com/actions/runner-images/issues/2840
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/share/powershell
- name: Build Helidon
run: |
# prime build
mvn ${MAVEN_ARGS} -e \
mvn ${MAVEN_ARGS} -T4 \
-DskipTests \
-Ptests \
install
- name: Run Tests
run: |
mvn ${MAVEN_ARGS} -e \
mvn ${MAVEN_ARGS} \
-f tests/integration/dbclient/pom.xml \
-pl ${{ matrix.modules || matrix.group }} \
-am \
Expand Down
5 changes: 3 additions & 2 deletions etc/scripts/build-examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,12 @@ readonly WS_DIR
readonly HELIDON_EXAMPLES_PATH=${WS_DIR}/helidon-examples
if [ ! -d "${WS_DIR}/helidon-examples" ]; then
echo "Cloning examples repository into ${WS_DIR}/helidon-examples"
git clone --branch dev-4.x --single-branch git@github.com:helidon-io/helidon-examples.git "${WS_DIR}/helidon-examples"
git clone --branch dev-4.x --single-branch https://github.com/helidon-io/helidon-examples.git "${WS_DIR}/helidon-examples"
fi

version() {
mvn -B -N -f "${1}" -Dexpression=helidon.version help:evaluate | grep -v '\[INFO\]'
# shellcheck disable=SC2086
mvn ${MAVEN_ARGS} -B -N -f "${1}" -Dexpression=helidon.version help:evaluate | grep -v '\[INFO\]'
}

# Make sure the helidon version from the example repo aligns with this repository
Expand Down
2 changes: 1 addition & 1 deletion etc/scripts/test-quickstarts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ mvn ${MAVEN_ARGS} --version
# If needed we clone the helidon-examples repo into a subdirectory of the helidon repository
if [ ! -d "${WS_DIR}/helidon-examples" ]; then
echo "Cloning examples repository into ${HELIDON_EXAMPLES_PATH}"
git clone --branch dev-4.x --single-branch git@github.com:helidon-io/helidon-examples.git "${WS_DIR}/helidon-examples"
git clone --branch dev-4.x --single-branch https://github.com/helidon-io/helidon-examples.git "${WS_DIR}/helidon-examples"
fi

# Build quickstart native-image executable and run jar file
Expand Down
18 changes: 0 additions & 18 deletions metrics/metrics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,23 +148,6 @@
</build>

<profiles>
<profile>
<id>pipeline</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<helidon.concurrentGauge.minRequiredSeconds>45</helidon.concurrentGauge.minRequiredSeconds>
<helidon.histogram.tolerance>0.25</helidon.histogram.tolerance>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>release</id>
<build>
Expand All @@ -190,5 +173,4 @@
</build>
</profile>
</profiles>

</project>
23 changes: 0 additions & 23 deletions metrics/provider-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,27 +150,4 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>pipeline</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<helidon.concurrentGauge.minRequiredSeconds>45</helidon.concurrentGauge.minRequiredSeconds>
<helidon.histogram.tolerance>0.25</helidon.histogram.tolerance>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>



</project>
19 changes: 0 additions & 19 deletions microprofile/metrics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -213,23 +213,4 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>pipeline</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<helidon.microprofile.metrics.perfTest.enabled>false</helidon.microprofile.metrics.perfTest.enabled>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit a07579b

Please sign in to comment.