Log resource reading errors to CONFIG logging #6673
This file contains hidden or 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: | |
pull_request: | |
branches: | |
- main | |
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, 21] | |
exclude: | |
- os: macos-latest | |
java: 8 | |
runs-on: ${{ matrix.os }} | |
steps: | |
# SETUP BUILD ENVIRONMENT | |
- id: prepare-maven-build | |
name: Prepare Maven build | |
uses: sualeh/prepare-maven-build@v1.6.1 | |
with: | |
java-version: ${{ matrix.java }} | |
- id: install-zip | |
name: Install zip on Windows | |
if: matrix.os == 'windows-latest' | |
shell: powershell | |
run: | | |
# Install MSYS2 | |
choco install -y msys2 | |
# Persist PATH for future sessions | |
$oldPath = [Environment]::GetEnvironmentVariable("Path", "User") | |
$newPath = "$oldPath;C:\tools\msys64\usr\bin" | |
[Environment]::SetEnvironmentVariable("Path", $newPath, "User") | |
# Update PATH current session too | |
$env:PATH += ";C:\tools\msys64\usr\bin" | |
# Install zip | |
C:\tools\msys64\usr\bin\bash -lc "pacman -Sy --noconfirm zip" | |
echo "Check zip version:" | |
zip --version | |
- id: install-zip-on-git-bash | |
name: Add MSYS2 to PATH for Git Bash | |
if: matrix.os == 'windows-latest' | |
shell: bash | |
run: | | |
echo "Add MSYS2 to PATH" | |
echo "C:/tools/msys64/usr/bin" >> $GITHUB_PATH | |
# BUILD AND TEST | |
- id: build-test | |
name: > | |
Build and run tests without Graphviz installed, using the Java library | |
and also create distribution | |
env: | |
TZ: GMT | |
shell: bash | |
run: | | |
# Build | |
mvn \ | |
--no-transfer-progress \ | |
--batch-mode \ | |
-Ddistrib \ | |
clean package | |
- id: gather-expected-results | |
name: Gather expected results for failed tests | |
if: always() | |
shell: bash | |
run: | | |
# Gather expected results | |
echo "Gather expected results" | |
# DEBUG | |
echo "Current working directory:" | |
pwd | |
echo "Show expected results directories:" | |
find . -type d -name "unit_tests_results_output" -exec echo {} \; | |
echo "zip version:" | |
zip --version | |
# Save expected results files | |
echo "Zip expected results:" | |
.github/scripts/unit-tests-results-output.sh $(realpath .) | |
- id: upload-unit-tests-results-output | |
name: Upload expected results files | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: expected-results-${{ matrix.os }}-${{ matrix.java }} | |
path: ./unit_tests_results_output.zip | |
retention-days: 5 | |
# 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 |