Skip to content

Commit

Permalink
Debug dev-it test
Browse files Browse the repository at this point in the history
  • Loading branch information
cherylking committed Jan 10, 2024
1 parent 9282110 commit 9c97ade
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 65 deletions.
121 changes: 58 additions & 63 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,9 @@ jobs:
fail-fast: false
matrix:
# test against latest update of each major Java version, as well as specific updates of LTS versions:
RUNTIME: [ol, wlp]
RUNTIME_VERSION: [23.0.0.10]
java: [21, 17, 11, 8]
exclude:
- java: 8
RUNTIME: wlp
- java: 11
RUNTIME: ol
RUNTIME: [ol]
RUNTIME_VERSION: [23.0.0.12]
java: [21]
name: ${{ matrix.RUNTIME }} ${{ matrix.RUNTIME_VERSION }}, Java ${{ matrix.java }}, Linux
steps:
# Checkout repos
Expand Down Expand Up @@ -67,60 +62,60 @@ jobs:
# Run tests that require a minimum of Java 17 or later
- name: Run tests that require a minimum of Java 17 or later
if: ${{ matrix.java == '17' || matrix.java == '21'}}
run: ./mvnw -V verify --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -Ponline-its -D"invoker.streamLogsOnFailures"=true -D"invoker.test"="*setup*,*springboot-3-*" -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}"
# Run tests
- name: Run tests
run: ./mvnw -V verify --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -Ponline-its -D"invoker.streamLogsOnFailures"=true -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}"
run: ./mvnw -V verify --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -Ponline-its -D"invoker.streamLogsOnFailures"=true -D"invoker.test"="*setup*,*dev-i*" -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}"
# # Run tests
# - name: Run tests
# run: ./mvnw -V verify --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -Ponline-its -D"invoker.streamLogsOnFailures"=true -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}"

# WINDOWS BUILD
build-windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
# test against latest update of each major Java version, as well as specific updates of LTS versions:
RUNTIME: [ol, wlp]
RUNTIME_VERSION: [23.0.0.10]
java: [21, 17, 11, 8]
exclude:
- java: 8
RUNTIME: ol
- java: 11
RUNTIME: wlp
name: ${{ matrix.RUNTIME }} ${{ matrix.RUNTIME_VERSION }}, Java ${{ matrix.java }}, Windows
steps:
# Checkout repos
- name: Checkout ci.maven
uses: actions/checkout@v3
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'maven'
# Move and cloning to C: drive for Windows for more disk space
- name: Clone ci.ant, ci.common, ci.maven repos to C drive
run: |
cp -r D:/a/ci.maven/ci.maven C:/ci.maven
git clone https://github.com/OpenLiberty/ci.common.git C:/ci.common
git clone https://github.com/OpenLiberty/ci.ant.git C:/ci.ant
- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: 3.9.2
# Install ci.ant
- name: Install ci.ant
working-directory: C:/ci.ant
run: .\mvnw.cmd -V clean install --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -DskipTests
# Install ci.common
- name: Install ci.common
working-directory: C:/ci.common
run: .\mvnw.cmd -V clean install --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -DskipTests
# Run tests that require a minimum of Java 17 or later
- name: Run tests that require a minimum of Java 17 or later
if: ${{ matrix.java == '17' || matrix.java == '21'}}
run: .\mvnw.cmd -V verify -Ponline-its --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -D"invoker.streamLogsOnFailures"=true -D"invoker.test"="*setup*,*springboot-3-*" -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}"
# Run tests
- name: Run tests
working-directory: C:/ci.maven
run: .\mvnw.cmd -V verify -Ponline-its --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -D"invoker.streamLogsOnFailures"=true -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}"
# build-windows:
# runs-on: windows-latest
# strategy:
# fail-fast: false
# matrix:
# # test against latest update of each major Java version, as well as specific updates of LTS versions:
# RUNTIME: [ol, wlp]
# RUNTIME_VERSION: [23.0.0.10]
# java: [21, 17, 11, 8]
# exclude:
# - java: 8
# RUNTIME: ol
# - java: 11
# RUNTIME: wlp
# name: ${{ matrix.RUNTIME }} ${{ matrix.RUNTIME_VERSION }}, Java ${{ matrix.java }}, Windows
# steps:
# # Checkout repos
# - name: Checkout ci.maven
# uses: actions/checkout@v3
# - name: Setup Java ${{ matrix.java }}
# uses: actions/setup-java@v3
# with:
# distribution: 'temurin'
# java-version: ${{ matrix.java }}
# cache: 'maven'
# # Move and cloning to C: drive for Windows for more disk space
# - name: Clone ci.ant, ci.common, ci.maven repos to C drive
# run: |
# cp -r D:/a/ci.maven/ci.maven C:/ci.maven
# git clone https://github.com/OpenLiberty/ci.common.git C:/ci.common
# git clone https://github.com/OpenLiberty/ci.ant.git C:/ci.ant
# - name: Set up Maven
# uses: stCarolas/[email protected]
# with:
# maven-version: 3.9.2
# # Install ci.ant
# - name: Install ci.ant
# working-directory: C:/ci.ant
# run: .\mvnw.cmd -V clean install --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -DskipTests
# # Install ci.common
# - name: Install ci.common
# working-directory: C:/ci.common
# run: .\mvnw.cmd -V clean install --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -DskipTests
# # Run tests that require a minimum of Java 17 or later
# - name: Run tests that require a minimum of Java 17 or later
# if: ${{ matrix.java == '17' || matrix.java == '21'}}
# run: .\mvnw.cmd -V verify -Ponline-its --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -D"invoker.streamLogsOnFailures"=true -D"invoker.test"="*setup*,*springboot-3-*" -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}"
# # Run tests
# - name: Run tests
# working-directory: C:/ci.maven
# run: .\mvnw.cmd -V verify -Ponline-its --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -D"invoker.streamLogsOnFailures"=true -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}"
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,16 @@ public static void setUpBeforeClass() throws Exception {
@Test
public void notOverwriteExistingM2Test() throws Exception {
// Check that the file was already created (from the run() during setup)
File ear = new File(System.getProperty("user.home"), ".m2/repository/io/openliberty/guides/guide-maven-multimodules-ear/1.0-SNAPSHOT/guide-maven-multimodules-ear-1.0-SNAPSHOT.ear");
assertTrue(ear.exists());
File m2Repo = new File(System.getProperty("user.home"), ".m2/repository");
assertTrue("The local .m2 repo does not exist at: "+m2Repo.getAbsolutePath(), m2Repo.exists());
File earModule = new File(m2Repo,"io/openliberty/guides/guide-maven-multimodules-ear");
if (!earModule.exists()) {
// try sleeping a bit in case it is not built yet?
Thread.sleep(30000); // 30 secs
}
assertTrue("The ear module does not exist in the local .m2 repo at: "+earModule.getAbsolutePath(), earModule.exists());
File ear = new File(earModule, "1.0-SNAPSHOT/guide-maven-multimodules-ear-1.0-SNAPSHOT.ear");
assertTrue("The .ear file does not exist at: "+ear.getAbsolutePath(), ear.exists());
long lastModified = ear.lastModified();
waitLongEnough();

Expand Down

0 comments on commit 9c97ade

Please sign in to comment.