Skip to content

Commit

Permalink
#15 test jib publish (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
stoerti committed Aug 19, 2024
1 parent ff052df commit c823205
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build-gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,51 @@ name: Build Gradle project
on:
push:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-gradle-project:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write
attestations: write
id-token: write

steps:
- name: Checkout project sources
uses: actions/checkout@v2

- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Build Frontend
run: ./gradlew frontend:appNpmBuild

- name: Build Backend
run: ./gradlew build -x test

- name: Test
run: ./gradlew test jacocoTestReport

- name: Build Image
run: ./gradlew jib

- name: Test Results
uses: dorny/test-reporter@v1
if: always()
Expand All @@ -31,6 +56,7 @@ jobs:
path: backend/build/test-results/test/*.xml
reporter: java-junit
fail-on-error: true

- name: JaCoCo Code Coverage Report
id: jacoco_reporter
uses: PavanMudigonda/jacoco-reporter@v4.8
Expand Down

0 comments on commit c823205

Please sign in to comment.