Integration Tests #4234
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
name: Integration Tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- '**' | |
schedule: | |
- cron: '22 22 * * *' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: read-all | |
jobs: | |
build: | |
name: Integration Tests | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
java: [8, 17] | |
runs-on: ${{ matrix.os }} | |
steps: | |
# SETUP BUILD ENVIRONMENT | |
- id: prepare-maven-build | |
name: Prepare Maven build | |
uses: sualeh/prepare-maven-build@v1.3.5 | |
with: | |
java-version: ${{ matrix.java }} | |
# BUILD AND TEST | |
- id: build-test | |
name: Build and run database integration tests | |
env: | |
TZ: GMT | |
shell: bash | |
run: | | |
# Build | |
mvn \ | |
--no-transfer-progress \ | |
--batch-mode \ | |
clean package | |
# INSTALL GRAPHVIZ, AND RERUN DIAGRAM TESTS | |
- id: install-graphviz | |
name: Install Graphviz | |
uses: sualeh/install-graphviz@v1.0.3 | |
- id: build-test-diagrams | |
name: Build and run diagram tests | |
shell: bash | |
run: | | |
# Build | |
mvn \ | |
--no-transfer-progress \ | |
--batch-mode \ | |
--projects \ | |
schemacrawler-diagram,schemacrawler-scripting \ | |
--also-make \ | |
package | |
# Save expected results files | |
.github/scripts/unit-tests-results-output.sh | |
- id: upload-unit-tests-results-output | |
name: Upload expected results files | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: unit-tests-results-output | |
path: ./unit-tests-results-output.zip | |
retention-days: 5 | |
build-test-docker: | |
name: Build, run tests, and build Docker image | |
runs-on: ubuntu-latest | |
steps: | |
# SETUP BUILD ENVIRONMENT | |
- id: maximize-build-space | |
name: Maximize build space | |
uses: easimon/maximize-build-space@master | |
with: | |
root-reserve-mb: '8192' | |
remove-dotnet: 'true' | |
remove-android: 'true' | |
remove-haskell: 'true' | |
remove-codeql: 'true' | |
remove-docker-images: 'true' | |
- id: prepare-maven-build | |
name: Prepare Maven build | |
uses: sualeh/prepare-maven-build@v1.3.5 | |
with: | |
java-version: 8 | |
- id: install-graphviz | |
name: Install Graphviz | |
uses: sualeh/install-graphviz@v1.0.3 | |
# BUILD AND TEST | |
- id: build-test | |
name: Build Docker image | |
shell: bash | |
run: | | |
# Build | |
mvn \ | |
--no-transfer-progress \ | |
--batch-mode \ | |
-Ddistrib \ | |
-Ddocker.skip=false \ | |
clean package |