ci #2
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: CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| cache: maven | |
| - name: Make Maven wrapper executable | |
| run: chmod +x mvnw | |
| - name: Validate Docker availability | |
| run: docker info | |
| - name: Build application image | |
| run: docker build -t avito-test-app . | |
| - name: Run unit and integration tests | |
| env: | |
| MAVEN_OPTS: "-Dmaven.repo.local=${{ github.workspace }}/.m2/repository" | |
| run: ./mvnw -B -ntp verify |