Skip to content

Java Demo CI (unreleased plugin version) #100

Java Demo CI (unreleased plugin version)

Java Demo CI (unreleased plugin version) #100

---
name: Java Demo CI (unreleased plugin version)
on:
push:
branches:
- main
tags-ignore:
- '*'
paths:
- build.gradle.kts
- internal/**
- plugin-gradle/**
- demo/java/**
- .github/workflows/demo-java-ci-unreleased.yml
pull_request:
types: [assigned, opened, synchronize, reopened]
paths:
- plugin-gradle/**
- demo/java/**
- .github/workflows/demo-java-ci-unreleased.yml
concurrency:
# Documentation suggests ${{ github.head_ref }}, but that's only available on pull_request/pull_request_target triggers, so using ${{ github.ref }}.
# On master, we want all builds to complete even if merging happens faster to make it easier to discover at which point something broke.
group: ${{ github.ref == 'refs/heads/main' && format('demo-java-ci-un-main-{0}', github.sha) || format('demo-java-ci-un-{0}', github.ref) }}
cancel-in-progress: true
env:
GRADLE_OPTS: -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false
jobs:
buildTest:
name: Build Java Demos (unreleased plugin version)
runs-on: ubuntu-latest
defaults:
run:
working-directory: demo/java
strategy:
fail-fast: false
max-parallel: 1
matrix:
java_version: [8, 17]
distribution: [zulu]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install JDK ${{ matrix.distribution }} ${{ matrix.java_version }}
uses: actions/setup-java@v4
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java_version }}
cache: gradle
- name: Build project Java Demo (unreleased plugin version)
run: ./gradlew build -S --scan --warning-mode all -I ../../gradle/init.gradle.kts