chore(ci): enhance test workflow and improve Postgres test container … #193
Workflow file for this run
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: Run Tests | |
| on: | |
| push: | |
| branches: [ main, develop, test ] | |
| pull_request: | |
| branches: [ main, develop, test ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Check Docker availability | |
| run: | | |
| docker --version | |
| docker info | |
| - name: Make gradlew executable | |
| run: chmod +x ./gradlew | |
| - name: Run memory-api tests with coverage | |
| run: ./gradlew :memory-api:test :memory-api:jacocoTestReport --info --stacktrace | |
| env: | |
| SPRING_PROFILES_ACTIVE: test | |
| TESTCONTAINERS_RYUK_DISABLED: true | |
| TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE: /var/run/docker.sock | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| file: ./memory-api/build/reports/jacoco/test/jacocoTestReport.xml |