-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3241 from geotools/online_test_migration_23.x
[23.x backport] Regular test, Q&A and MS SQL Server GH-Action workflow
- Loading branch information
Showing
11 changed files
with
169 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: Linux GitHub CI | ||
|
||
on: [pull_request] | ||
|
||
env: | ||
MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 | ||
|
||
jobs: | ||
openjdk8: | ||
runs-on: [ubuntu-18.04] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 8 | ||
- name: Maven repository caching | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- uses: actions/setup-python@v1 | ||
- uses: BSFishy/pip-action@v1 | ||
with: | ||
packages: | | ||
sphinx | ||
requests | ||
- name: Build with Maven | ||
run: | | ||
mvn -B clean install -Dfmt.skip=true -Dall -T2 --file pom.xml | ||
- name: Remove SNAPSHOT jars from repository | ||
run: | | ||
find ~/.m2/repository -name "*SNAPSHOT*" -type d | xargs rm -rf {} | ||
openjdk11: | ||
runs-on: [ubuntu-20.04] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: Maven repository caching | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- uses: actions/setup-python@v1 | ||
- uses: BSFishy/pip-action@v1 | ||
with: | ||
packages: | | ||
sphinx | ||
requests | ||
- name: Build with Maven | ||
run: | | ||
mvn -B clean install -Dfmt.skip=true -Dall -T2 -Pjdk11test --file pom.xml | ||
- name: Remove SNAPSHOT jars from repository | ||
run: | | ||
find ~/.m2/repository -name "*SNAPSHOT*" -type d | xargs rm -rf {} | ||
QA: | ||
runs-on: [ubuntu-20.04] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: Maven repository caching | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Build with Maven | ||
run: | | ||
mvn -B -fae clean install -Dall -Dfmt.action=check -Dqa=true -DskipTests=true --file pom.xml | ||
- name: Remove SNAPSHOT jars from repository | ||
run: | | ||
find ~/.m2/repository -name "*SNAPSHOT*" -type d | xargs rm -rf {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: MS SQL Server online tests | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
build: | ||
name: MS SQL ${{ matrix.mssql }} online test | ||
runs-on: [ubuntu-latest] | ||
strategy: | ||
matrix: | ||
mssql: [2019-latest] | ||
java: [11] | ||
|
||
steps: | ||
- name: Set up JDK ${{ matrix.java }} | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
- uses: actions/checkout@v2 | ||
- name: Maven repository caching | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: mssql-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
mssql-${{ runner.os }}-maven- | ||
- name: Setup test environment for MS SQL ${{ matrix.mssql }} | ||
run: | | ||
./build/ci/mssql/start-mssql.sh ${{ matrix.mssql }} | ||
./build/ci/mssql/setup-mssql.sh | ||
- name: Build GeoTools dependent modules (no tests) | ||
run: mvn -B clean install -T2 -Dall -pl :gt-jdbc-sqlserver -DskipTests -am | ||
- name: Test MS SQL Server data store | ||
run: mvn -B clean install -T2 -Dall -pl :gt-jdbc-sqlserver -Ponline -Dfmt.skip=true | ||
- name: Remove SNAPSHOT jars from repository | ||
run: | | ||
find ~/.m2/repository -name "*SNAPSHOT*" -type d | xargs rm -rf {} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash -e | ||
printf "\nCopy database connection resource file...\n" | ||
mkdir --parents --verbose ~/.geotools | ||
cp --verbose --force ./build/ci/mssql/sqlserver.properties ~/.geotools/ | ||
|
||
printf "\nCreate GEOTOOLS database...\n" | ||
docker exec -i geotools /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "Password12!" -Q 'CREATE DATABASE geotools' -d "master" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash -e | ||
docker version | ||
docker pull mcr.microsoft.com/mssql/server:$1 | ||
|
||
printf "\n\nStarting MS SQL Server $1 container, this could take a while..." | ||
# start the dockerized ms sql instance (the container will be destroyed/removed on stopping) | ||
# this container can be stopped using: docker stop geotools | ||
docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=Password12!' --rm -p 1433:1433 --name geotools -h geotools -d mcr.microsoft.com/mssql/server:$1 | ||
|
||
printf "\nWaiting for MS SQL Server $1 database to start up.... " | ||
_WAIT=0; | ||
while : | ||
do | ||
printf " $_WAIT" | ||
if $(docker logs geotools 2>&1 | grep -q 'SQL Server is now ready for client connections'); then | ||
printf "\nSQL Server is now ready for client connections\n\n" | ||
break | ||
fi | ||
|
||
sleep 10 | ||
_WAIT=$(($_WAIT+10)) | ||
done | ||
|
||
# print logs | ||
docker logs geotools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters