test: add adbc-postgres #33
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: Code Format Check | |
| on: | |
| pull_request: | |
| branches: [ main, master ] | |
| paths: | |
| - 'java-tests/**/*.java' | |
| - 'java-tests/pom.xml' | |
| - 'python-tests/**/*.py' | |
| - 'go-tests/**/*.go' | |
| - 'go-tests/go.mod' | |
| - 'go-tests/go.sum' | |
| push: | |
| branches: [ main, master ] | |
| paths: | |
| - 'java-tests/**/*.java' | |
| - 'java-tests/pom.xml' | |
| - 'python-tests/**/*.py' | |
| - 'go-tests/**/*.go' | |
| - 'go-tests/go.mod' | |
| - 'go-tests/go.sum' | |
| jobs: | |
| java-format-check: | |
| name: Check Java Code Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| - name: Check code format with Spotless | |
| run: | | |
| cd java-tests | |
| mvn spotless:check | |
| - name: Format check failed | |
| if: failure() | |
| run: | | |
| echo "❌ Java code format check failed!" | |
| echo "Run: cd java-tests && mvn spotless:apply" | |
| exit 1 | |
| python-format-check: | |
| name: Check Python Code Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.8' | |
| - name: Install formatting tools | |
| run: pip install black flake8 | |
| - name: Check code format with black | |
| run: | | |
| cd python-tests | |
| black --check tests/ | |
| - name: Check code style with flake8 | |
| run: | | |
| cd python-tests | |
| flake8 tests/ --max-line-length=100 --extend-ignore=E203,W503 | |
| - name: Format check failed | |
| if: failure() | |
| run: | | |
| echo "❌ Python code format check failed!" | |
| echo "Run: cd python-tests && black tests/" | |
| exit 1 | |
| go-format-check: | |
| name: Check Go Code Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| - name: Check code format with gofmt | |
| run: | | |
| cd go-tests | |
| unformatted=$(gofmt -l .) | |
| if [ -n "$unformatted" ]; then | |
| echo "❌ Unformatted files:" | |
| echo "$unformatted" | |
| echo "Run: cd go-tests && gofmt -w ." | |
| exit 1 | |
| fi |