Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/formatter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
JAVA_VERSION: '21'

permissions:
contents: read
pull-requests: write
Expand All @@ -31,10 +34,10 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Set up JDK 21
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '21'
java-version: "${{ env.JAVA_VERSION }}"
distribution: 'temurin'
cache: 'maven'

Expand Down
128 changes: 119 additions & 9 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ concurrency:
env:
HEAD_REF: ${{ github.head_ref }}
REF_NAME: ${{ github.ref_name }}
BASE_REF: ${{ github.event.pull_request.base.ref }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
PR_NUMBER: ${{ github.event.number }}
JAVA_VERSION: '21'
BASE_VERSION: '25.0-SNAPSHOT'
jobs:
check-permissions:
uses: ./.github/workflows/check-permissions.yml
Expand All @@ -38,10 +42,10 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '24.9.0'
- name: Set up JDK 21
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '21'
java-version: "${{ env.JAVA_VERSION }}"
distribution: 'temurin'
- name: Set up Maven
uses: stCarolas/setup-maven@v5
Expand Down Expand Up @@ -83,10 +87,10 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{env.HEAD_SHA}}
- name: Set up JDK 21
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '21'
java-version: "${{ env.JAVA_VERSION }}"
distribution: 'temurin'
- name: Set up Maven
uses: stCarolas/setup-maven@v5
Expand Down Expand Up @@ -158,10 +162,10 @@ jobs:
- uses: oven-sh/setup-bun@v2
with:
bun-version: 'latest'
- name: Set up JDK 21
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '21'
java-version: "${{ env.JAVA_VERSION }}"
distribution: 'temurin'
- name: Set up Maven
uses: stCarolas/setup-maven@v5
Expand Down Expand Up @@ -247,7 +251,7 @@ jobs:
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
junit_files: "**/target/*-reports/TEST*.xml"
junit_files: '**/target/*-reports/TEST*.xml'
check_run_annotations: all tests, skipped tests
- uses: geekyeggo/delete-artifact@v4
with:
Expand All @@ -259,5 +263,111 @@ jobs:
- name: Set Failure Status
if: ${{ always() && (needs.unit-tests.result != 'success' || needs.it-tests.result != 'success') }}
run: |
echo "🚫 THERE ARE TEST MODULES WITH FAILURES or BEEN CANCELLED" | tee -a $GITHUB_STEP_SUMMARY
exit 1
echo "🚫 THERE ARE TEST MODULES WITH FAILURES or BEEN CANCELLED" | tee -a $GITHUB_STEP_SUMMARY
exit 1
api-diff-labeling:
if: github.event_name == 'pull_request_target'
timeout-minutes: 90
runs-on: ubuntu-24.04
permissions:
contents: read
issues: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{env.HEAD_SHA}}
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: "${{ env.JAVA_VERSION }}"
distribution: 'temurin'
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.2
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Use temporary flow version
run: |
mvn versions:set -DnewVersion=1111.3.2-SNAPSHOT -B
- name: Determine base version
id: base-version
run: |
baseBranch="${{ env.BASE_REF }}"
echo "Base branch: ${baseBranch}"
# Handle special case for main branch
if [[ "${baseBranch}" == "main" ]]; then
baseVersion="${{ env.BASE_VERSION }}"
else
# For all other branches, use pattern: {branch}-SNAPSHOT
baseVersion="${baseBranch}-SNAPSHOT"
fi
echo "Base API Version: ${baseVersion}"
echo "BASE_API_VERSION=${baseVersion}" >> $GITHUB_OUTPUT
- name: Calculate API version difference
run: |
mvn clean install -B -ntp -e -V -pl=flow-server,flow-data,flow-html-components,vaadin-spring -am -Papicmp -DskipTests -Dapi.reference.version=${{ steps.base-version.outputs.BASE_API_VERSION }} -Dtest.use.hub=true -Djapicmp.maven.plugin.version=0.22.0
- name: Move API diff results
run: |
#!/bin/bash
mkdir -p apidiff
mv flow-server/target/japicmp apidiff/flow-server
mv flow-data/target/japicmp apidiff/flow-data
mv flow-html-components/target/japicmp apidiff/flow-html-components
mv vaadin-spring/target/japicmp apidiff/vaadin-spring
- name: Upload API diff artifacts
uses: actions/upload-artifact@v4
with:
name: apidiff-reports
path: apidiff/
- name: Report API DIFF to GitHub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
#!/bin/bash
echo "Running API version verification"
diff_files=$( find apidiff -name "*.html")
version_change="0.0.0"
for file in ${diff_files}
do
echo " Verifying file '${file}'..."
temp_version_change=$( grep -A 2 "id=\"semver-version\"" ${file} | grep -o [0-9]\.[0-9]\.[0-9] || echo "0.0.0")
if [[ "${version_change}" < "${temp_version_change}" ]]; then
version_change=${temp_version_change}
fi
done
echo "Discovered version change: ${version_change}"
# Get current labels
current_labels=$(gh api repos/${{ github.repository }}/issues/${{ env.PR_NUMBER }}/labels --jq '.[].name')
# Check if version change label already exists
if echo "${current_labels}" | grep -q "+${version_change}"; then
echo "Discovered version change '${version_change}' is already labeled, no need to update"
else
echo "Updating version change label to +${version_change}"
# Remove existing version labels
for tlabel in '+0.0.1' '+0.1.0' '+1.0.0'; do
if echo "${current_labels}" | grep -q "${tlabel}" && [[ "${version_change}" != "${tlabel##+}" ]]; then
echo "Removing label ${tlabel}"
gh api repos/${{ github.repository }}/issues/${{ env.PR_NUMBER }}/labels/"${tlabel}" -X DELETE || true
fi
done
# Add new version label
gh api repos/${{ github.repository }}/issues/${{ env.PR_NUMBER }}/labels \
-f labels[]="+${version_change}" \
--method POST
fi
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Vaadin Flow

**For issues related to [Hilla](https://hilla.dev/), please refer to the https://github.com/vaadin/hilla repository.**

foo

Ask questions about Vaadin Flow in our [forum](https://vaadin.com/forum/c/flow/8).

Since [Vaadin platform 23.0](https://github.com/vaadin/platform), Flow major and minor versions are aligned with platform versions:
Expand Down
Loading