Skip to content

Commit

Permalink
Merge pull request #2446 from Fishbowler/fix-db-tests
Browse files Browse the repository at this point in the history
OF-2813: Stash the mvn repo after build, and re-use in later jobs
  • Loading branch information
akrherz committed Mar 2, 2024
2 parents abd2f93 + b53e677 commit 015c9a5
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ jobs:
java-version: ${{ matrix.java }}
distribution: ${{ matrix.distribution }}
cache: maven
- name: Build with Maven
- name: Build with Maven # We install instead of package, because we want the result in the local mvn repo
run: |
if [[ ${{ github.ref_name }} == 'main' ]]; then
./mvnw -B package -Pcoverage --file pom.xml
./mvnw -B install -Pcoverage --file pom.xml
else
./mvnw -B package
./mvnw -B install
fi
- name: Upload failed test reports
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -58,6 +58,14 @@ jobs:
with:
name: Coverage Report for 'xmppserver' module
path: xmppserver/target/site/jacoco/
- name: Temporarily stash openfire artifacts from the mvn repo for later jobs
if: ${{ matrix.distribution == 'zulu' && matrix.java == 11 }}
uses: actions/upload-artifact@v4
with:
name: mvn-repo
path: ~/.m2/repository/org/igniterealtime/openfire/
retention-days: 1


aioxmpp:

Expand Down Expand Up @@ -213,6 +221,11 @@ jobs:
java-version: 11
distribution: zulu
cache: maven
- name: Restore mvn repo artifacts from build job
uses: actions/download-artifact@v4
with:
name: mvn-repo
path: ~/.m2/repository/org/igniterealtime/openfire/
- name: Set environment variables
run: |
echo "CONNECTION_STRING=jdbc:sqlserver://localhost:1433;databaseName=openfire;applicationName=Openfire" >> $GITHUB_ENV
Expand Down Expand Up @@ -249,6 +262,11 @@ jobs:
java-version: 11
distribution: zulu
cache: maven
- name: Restore mvn repo artifacts from build job
uses: actions/download-artifact@v4
with:
name: mvn-repo
path: ~/.m2/repository/org/igniterealtime/openfire/
- name: Set environment variables
run: |
echo "CONNECTION_STRING=jdbc:postgresql://localhost:5432/openfire" >> $GITHUB_ENV
Expand Down Expand Up @@ -285,6 +303,11 @@ jobs:
java-version: 11
distribution: zulu
cache: maven
- name: Restore mvn repo artifacts from build job
uses: actions/download-artifact@v4
with:
name: mvn-repo
path: ~/.m2/repository/org/igniterealtime/openfire/
- name: Set environment variables
run: |
echo "CONNECTION_STRING=jdbc:mysql://localhost:3306/openfire?rewriteBatchedStatements=true&characterEncoding=UTF-8&characterSetResults=UTF-8&serverTimezone=UTC" >> $GITHUB_ENV
Expand Down

0 comments on commit 015c9a5

Please sign in to comment.