Initial #1
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: Main CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Compose | |
| run: docker compose version | |
| - name: Start services with Docker Compose | |
| run: docker compose up -d | |
| - name: Wait for PostgreSQL | |
| run: | | |
| until docker exec $(docker ps -qf "name=db") pg_isready -U postgres; do | |
| echo "Waiting for PostgreSQL..." | |
| sleep 2 | |
| done | |
| - name: Set up OpenJDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Build with Maven | |
| run: mvn clean install | |
| - name: Run tests | |
| run: mvn test | |
| - name: Run Checkstyle | |
| run: mvn checkstyle:check |