Skip to content

Continuous Project Verification #70

Continuous Project Verification

Continuous Project Verification #70

# Without continuously working on the source code, we may encounter startup/test issues
# quite late. That's why we regularly run at least all tests and verify that the
# application can be started in local development mode
name: Continuous Project Verification
on:
schedule:
- cron: '0 5 * * SUN' # Every Sunday at 5 AM
workflow_dispatch:
jobs:
build-and-test-applications:
strategy:
fail-fast: false
matrix:
folder: [ 'application', 'getting-started-with-spring-boot-on-aws' ]
runs-on: ubuntu-20.04
name: Test ${{ matrix.folder }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'gradle'
- name: Build and test the application
working-directory: ${{ matrix.folder }}
run: ./gradlew build --stacktrace
verify-local-development-mode:
runs-on: ubuntu-20.04
name: Verify local development mode
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'gradle'
- name: Start the local environment and verify the application startup
working-directory: application
run: |
docker compose up -d
./gradlew bootRun &
timeout 180 ../.github/workflows/health-check.sh 8080
- name: Stop local environment
working-directory: application
if: always()
run: |
docker compose logs
docker compose down