Skip to content

OF-2559: Introduce Netty for S2S & C2S #184

OF-2559: Introduce Netty for S2S & C2S

OF-2559: Introduce Netty for S2S & C2S #184

name: Openfire Database Upgrade Tests
env:
CI: true
STARTER_VERSION: 21 # The version of the initial DB being installed, as per the ofVersion table
on:
push:
branches: [ main ]
paths:
- 'distribution/src/database/**'
- 'build/ci/**'
- '.github/workflows/database-upgrades.yml'
- 'xmppserver/pom.xml'
pull_request:
paths:
- 'distribution/src/database/**'
- 'build/ci/**'
- '.github/workflows/database-upgrades.yml'
- 'xmppserver/pom.xml'
jobs:
sqlserver:
name: Test SQL Server Upgrades
runs-on: ubuntu-latest
steps:
- name: Checkout Openfire
uses: actions/checkout@v3
- name: Set environment variables
run: |
echo "CONNECTION_STRING=jdbc:sqlserver://localhost:1433;databaseName=openfire;applicationName=Openfire" >> $GITHUB_ENV
echo "CONNECTION_DRIVER=com.microsoft.sqlserver.jdbc.SQLServerDriver" >> $GITHUB_ENV
echo "CONNECTION_USERNAME=sa" >> $GITHUB_ENV
echo "CONNECTION_PASSWORD=SecurePa55w0rd" >> $GITHUB_ENV
OPENFIREVSN=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "OPENFIREVSN=$OPENFIREVSN" >> $GITHUB_ENV
echo "JAVA_HOME=$(echo $JAVA_HOME_11_X64)" >> $GITHUB_ENV
- name: Download old Openfire database script
run: |
mkdir olddb
curl https://raw.githubusercontent.com/igniterealtime/Openfire/v3.9.3/src/database/openfire_sqlserver.sql > $GITHUB_WORKSPACE/olddb/openfire_sqlserver.sql
- name: Start database server and install database
run: docker-compose -f ./build/ci/compose/mssql.yml up --detach
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build openfire
run: ./mvnw install
- name: Build & run update tester
run: |
pushd ./build/ci/updater
./mvnw package
java -jar ./target/updaterunner-1.0.0-jar-with-dependencies.jar
postgres:
name: Test Postgres Upgrades
runs-on: ubuntu-latest
steps:
- name: Checkout Openfire
uses: actions/checkout@v3
- name: Set environment variables
run: |
echo "CONNECTION_STRING=jdbc:postgresql://localhost:5432/openfire" >> $GITHUB_ENV
echo "CONNECTION_DRIVER=org.postgresql.Driver" >> $GITHUB_ENV
echo "CONNECTION_USERNAME=openfire" >> $GITHUB_ENV
echo "CONNECTION_PASSWORD=SecurePa55w0rd" >> $GITHUB_ENV
OPENFIREVSN=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "OPENFIREVSN=$OPENFIREVSN" >> $GITHUB_ENV
echo "JAVA_HOME=$(echo $JAVA_HOME_11_X64)" >> $GITHUB_ENV
- name: Download old Openfire database script
run: |
mkdir olddb
curl https://raw.githubusercontent.com/igniterealtime/Openfire/v3.9.3/src/database/openfire_postgresql.sql > $GITHUB_WORKSPACE/olddb/openfire_postgresql.sql
- name: Start database server and install database
run: docker-compose -f ./build/ci/compose/postgresql.yml up --detach
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build openfire
run: ./mvnw install
- name: Build & run update tester
run: |
pushd ./build/ci/updater
./mvnw package
java -jar ./target/updaterunner-1.0.0-jar-with-dependencies.jar
mysql:
name: Test MySQL Upgrades
runs-on: ubuntu-latest
steps:
- name: Checkout Openfire
uses: actions/checkout@v3
- 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
echo "CONNECTION_DRIVER=com.mysql.cj.jdbc.Driver" >> $GITHUB_ENV
echo "CONNECTION_USERNAME=root" >> $GITHUB_ENV
echo "CONNECTION_PASSWORD=SecurePa55w0rd" >> $GITHUB_ENV
OPENFIREVSN=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "OPENFIREVSN=$OPENFIREVSN" >> $GITHUB_ENV
echo "JAVA_HOME=$(echo $JAVA_HOME_11_X64)" >> $GITHUB_ENV
- name: Download old Openfire database script
run: |
mkdir olddb
curl https://raw.githubusercontent.com/igniterealtime/Openfire/v3.9.3/src/database/openfire_mysql.sql > $GITHUB_WORKSPACE/olddb/openfire_mysql.sql
- name: Start database server and install database
run: docker-compose -f ./build/ci/compose/mysql.yml up --detach
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build openfire
run: ./mvnw install
- name: Build & run update tester
run: |
pushd ./build/ci/updater
./mvnw package
java -jar ./target/updaterunner-1.0.0-jar-with-dependencies.jar