Repository navigation
Workflow didn't start? #5
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: Backend-CI | ||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| branches: [ "main" ] | ||
| jobs: | ||
| build-and-test: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| services: | ||
| docker: | ||
| image: docker:29.0.2-dind | ||
| privileged: true | ||
| options: >- | ||
| --tls=false | ||
| ports: | ||
| - 2375:2375 | ||
| env: | ||
| DOCKER_HOST: tcp://localhost:2375 | ||
| TESTCONTAINERS_RYUK_DISABLED: false | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Set up JDK 24 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '24' | ||
| - name: Cache Maven dependencies | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.m2/repository | ||
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-maven- | ||
| - name: Enable Docker for Testcontainers | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y docker.io | ||
| docker info | ||
| # Run Unit + Integration Tests | ||
| - name: Run Tests (Unit + Integration) | ||
| run: mvn -B clean verify | ||
| working-directory: ./springqpro-backend | ||