-
Notifications
You must be signed in to change notification settings - Fork 280
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run Azure blob store integration tests with Azure and Azurite
Azurite is run as a testcontainer, and the github CI build runs all integration tests for Java 11, 17, and 21. In order to save on Azure resources, online integration tests are run only if the Azurite based tests succeeded, using github secrets to set up the account, key, and container; and for Java 11 only.
- Loading branch information
Showing
23 changed files
with
1,136 additions
and
91 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,80 @@ | ||
name: Azure BlobStore Integration | ||
|
||
on: | ||
push: | ||
tags: | ||
- "**" | ||
pull_request: | ||
paths: | ||
- ".github/workflows/azure-integration.yml" | ||
- "pom.xml" | ||
- "geowebcache/pom.xml" | ||
- "geowebcache/core/**" | ||
- "geowebcache/azureblob/**" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
azurite: | ||
name: Azurite container | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
java-version: [ 11, 17, 21 ] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: ${{ matrix.java-version }} | ||
cache: 'maven' | ||
|
||
- name: Tests against Azurite TestContainers | ||
#-PexcludeOnlineTests includes Azurite container tests and excludes Azure online tests | ||
run: | | ||
mvn verify -f geowebcache/pom.xml -pl :gwc-azure-blob -am \ | ||
-DskipTests=true -DskipITs=false -B -ntp \ | ||
-PexcludeOnlineTests | ||
- name: Remove SNAPSHOT jars from repository | ||
run: | | ||
find .m2/repository -name "*SNAPSHOT*" -type d | xargs rm -rf {} | ||
azure: | ||
name: Azure online | ||
#if: github.repository == 'geowebcache/geowebcache' | ||
runs-on: ubuntu-latest | ||
needs: azurite | ||
if: | | ||
always() && | ||
!contains(needs.*.result, 'cancelled') && | ||
!contains(needs.*.result, 'failure') | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 11 | ||
cache: 'maven' | ||
|
||
- name: Tests against Azure | ||
env: | ||
azure_account: ${{ secrets.AZURE_ACCOUNT }} | ||
azure_account_key: ${{ secrets.AZURE_ACCOUNT_KEY }} | ||
azure_container: ${{ secrets.AZURE_CONTAINER }} | ||
if: ${{ env.azure_account != null }} && ${{ env.azure_account_key != null }} | ||
run: | #-PexcludeDockerTests includes Azure online tests and excludes Azurite container tests | ||
echo "accountName=$azure_account" > $HOME/.gwc_azure_tests.properties | ||
echo "accountKey=$azure_account_key" >> $HOME/.gwc_azure_tests.properties | ||
echo "container=$azure_container" >> $HOME/.gwc_azure_tests.properties | ||
echo 'maxConnections=8' >> $HOME/.gwc_azure_tests.properties | ||
echo 'useHTTPS=true' >> $HOME/.gwc_azure_tests.properties | ||
mvn verify -f geowebcache/pom.xml -pl :gwc-azure-blob -am \ | ||
-DskipTests=true -DskipITs=false -B -ntp \ | ||
-PexcludeDockerTests | ||
- 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
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
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
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
Oops, something went wrong.