[TECH]: Bump pl.allegro.tech.build.axion-release from 1.18.1 to 1.18.7 #20
Workflow file for this run
This file contains 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: PR Build | |
on: | |
pull_request: | |
branches: [ main ] | |
paths: | |
- 'gradle/**' | |
- '**.gradle' | |
- 'gradle.properties' | |
- 'sd-app/**' | |
- 'sd-ft/**' | |
- '.github/workflows/pr-build.yml' | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: 'Log level' | |
required: true | |
default: 'debug' | |
type: choice | |
options: | |
- info | |
- warning | |
- debug | |
jobs: | |
build-and-unit-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Build + unit tests | |
run: ./gradlew :sd-app:build | |
- name: Upload unit tests report | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: unit-tests-report | |
path: | | |
sd-app/build/reports/tests/test/**/* | |
- name: Upload JAR | |
uses: actions/upload-artifact@v4 | |
with: | |
name: app-jar | |
path: sd-app/build/libs/service-discovery.jar | |
functional-tests: | |
needs: build-and-unit-tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Download JAR | |
uses: actions/download-artifact@v4 | |
with: | |
name: app-jar | |
path: sd-app/build/libs/ | |
- name: Start Spring Boot app | |
run: java -jar sd-app/build/libs/service-discovery.jar & | |
- name: Wait for Spring Boot to start | |
run: | | |
echo "Waiting for Spring Boot to start..." | |
sleep 3 | |
- name: Run functional tests | |
run: ./gradlew --no-daemon :sd-ft:cucumber | |
- name: Stop Spring Boot app | |
run: | | |
echo "Stopping Spring Boot app..." | |
pkill -f 'java -jar sd-app/build/libs/service-discovery.jar' | |
- name: Archive Cucumber test reports | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cucumber-tests-report | |
path: | | |
sd-ft/reports/cucumber-report.html | |
build-docker-image: | |
needs: build-and-unit-tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Download JAR | |
uses: actions/download-artifact@v4 | |
with: | |
name: app-jar | |
path: sd-app/build/libs/ | |
- name: Build Docker Image | |
run: docker build -t myapp:${{ github.sha }} sd-app/ |