Skip to content

Build docker images from development and publish to Github's registry #142

Build docker images from development and publish to Github's registry

Build docker images from development and publish to Github's registry #142

Workflow file for this run

name: X-Road-Catalog tests
on:
# Capture this event so that gradle caches are updated when a PR is merged to develop
# More information on why: https://github.com/gradle/gradle-build-action#using-the-caches-read-only
workflow_dispatch:
push:
branches:
- develop
paths:
- 'xroad-catalog-collector/src/**'
- 'xroad-catalog-lister/src/**'
- 'xroad-catalog-persistence/src/**'
- '.github/**'
- 'gradle/**' # So that gradle changes are tested
- 'settings.gradle' # So that gradle changes are tested
- 'build.gradle' # So that gradle changes are tested
- 'gradle.properties' # So that gradle changes are tested
pull_request:
types: [opened, synchronize, reopened]
paths:
- 'xroad-catalog-collector/src/**'
- 'xroad-catalog-lister/src/**'
- 'xroad-catalog-persistence/src/**'
- '.github/**'
- 'gradle/**' # So that gradle changes are tested
- 'settings.gradle' # So that gradle changes are tested
- 'build.gradle' # So that gradle changes are tested
- 'gradle.properties' # So that gradle changes are tested
permissions:
contents: write # Required for https://github.com/gradle/actions/tree/main/setup-gradle#github-dependency-graph-support
pull-requests: write # https://github.com/gradle/actions/tree/main/setup-gradle#adding-job-summary-as-a-pull-request-comment
actions: read # Required for https://github.com/dorny/test-reporter
checks: write # Required for https://github.com/dorny/test-reporter
jobs:
BuildAndTest:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
cache-cleanup: always
dependency-graph: generate-and-submit
add-job-summary-as-pr-comment: always
- name: Gradle build environment
run: ./gradlew buildEnvironment xroad-catalog-persistence:buildEnvironment xroad-catalog-collector:buildEnvironment xroad-catalog-lister:buildEnvironment --stacktrace
- name: Run tests
run: ./gradlew build --stacktrace
- name: Test report
env:
NODE_OPTIONS: '--max-old-space-size=6144'
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Test results
path: ./**/build/test-results/**/TEST-*.xml
reporter: java-junit
list-suites: 'failed'
list-tests: 'failed'