Skip to content

chore(deps): bump js-yaml, @typescript-eslint/eslint-plugin, eslint and eslint-config-vaadin in /flow-client #25878

chore(deps): bump js-yaml, @typescript-eslint/eslint-plugin, eslint and eslint-config-vaadin in /flow-client

chore(deps): bump js-yaml, @typescript-eslint/eslint-plugin, eslint and eslint-config-vaadin in /flow-client #25878

Workflow file for this run

name: Flow Validation
on:
push:
branches: [main, '24.9', '24.8', '24.7', '23.6']
workflow_dispatch:
pull_request_target:
types: [opened, synchronize, reopened, edited]
permissions:
contents: read
concurrency:
group: ${{ github.head_ref }} || ${{ github.ref_name }}
cancel-in-progress: true
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'
jobs:
check-permissions:
uses: ./.github/workflows/check-permissions.yml
build:
needs: check-permissions
timeout-minutes: 30
runs-on: ubuntu-24.04
outputs:
matrix-unit: ${{ steps.set-matrix.outputs.matrix-unit }}
matrix-it: ${{ steps.set-matrix.outputs.matrix-it }}
steps:
- run: echo "Concurrency Group = ${HEAD_REF:-$REF_NAME}"
- name: Check secrets
run: |
[ -z "${{secrets.TB_LICENSE}}" ] \
&& echo "🚫 **TB_LICENSE** is not defined, check that **${{github.repository}}** repo has a valid secret" \
| tee -a $GITHUB_STEP_SUMMARY && exit 1 || exit 0
- uses: actions/checkout@v4
with:
ref: ${{env.HEAD_SHA}}
- uses: actions/setup-node@v4
with:
node-version: '24.9.0'
- 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.8.7
- name: Set flow version to 999.99-SNAPSHOT
run: |
./scripts/computeMatrix.js set-version --version=999.99-SNAPSHOT
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Generate matrices
id: set-matrix
run: |
echo "matrix-it=$(./scripts/computeMatrix.js it-tests --parallel=13 current module args)" >> $GITHUB_OUTPUT
echo "matrix-unit=$(./scripts/computeMatrix.js unit-tests --parallel=3 current module args)" >> $GITHUB_OUTPUT
- name: Compile and Install Flow
run: |
cmd="mvn install -B -ntp -DskipTests -pl \!flow-plugins/flow-gradle-plugin"
eval $cmd -T 2C -q || eval $cmd
- name: Save workspace
run: |
tar cf workspace.tar -C ~/ $(cd ~/ && echo .m2/repository/com/vaadin/*/999.99-SNAPSHOT)
tar rf workspace.tar $(find . -d -name target)
- uses: actions/upload-artifact@v4
with:
name: saved-workspace
path: workspace.tar
unit-tests:
needs: build
timeout-minutes: 30
strategy:
fail-fast: false
matrix: ${{fromJson(needs.build.outputs.matrix-unit)}}
runs-on: ubuntu-24.04
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.8.7
- name: Set flow version to 999.99-SNAPSHOT
run: |
./scripts/computeMatrix.js set-version --version=999.99-SNAPSHOT
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- uses: actions/download-artifact@v4
if: ${{ github.run_attempt == 1 }}
with:
name: saved-workspace
- name: Restore Workspace
if: ${{ github.run_attempt == 1 }}
run: |
set -x
tar xf workspace.tar
tar cf - .m2 | (cd ~ && tar xf -)
- name: Compile and Install Flow
if: ${{ github.run_attempt > 1 }}
run: |
./scripts/computeMatrix.js set-version --version=999.99-SNAPSHOT
cmd="mvn install -B -ntp -DskipTests -pl \!flow-plugins/flow-gradle-plugin"
eval $cmd -T 2C -q || eval $cmd
- name: Set TB License
run: |
TB_LICENSE=${{secrets.TB_LICENSE}}
mkdir -p ~/.vaadin/
echo '{"username":"'`echo $TB_LICENSE | cut -d / -f1`'","proKey":"'`echo $TB_LICENSE | cut -d / -f2`'"}' > ~/.vaadin/proKey
- name: Unit Test
run: |
echo Running TESTS: ${{ strategy.job-index }} ${{matrix.module}} ${{ matrix.args }}
[ -n "${{matrix.module}}" ] && \
ARGS="-pl ${{matrix.module}} -Dtest=${{matrix.args}}" || \
ARGS="-pl ${{matrix.args}}"
cmd="mvn -B -ntp -T 1C $ARGS"
set -x -e -o pipefail
$cmd verify -Dmaven.javadoc.skip=false | tee mvn-unit-tests-${{matrix.current}}.out
- name: Package test-report files
if: ${{ failure() || success() }}
run: find . -name surefire-reports -o -name failsafe-reports -o -name error-screenshots -o -name "mvn-*.out" | tar -czf tests-report-unit-${{matrix.current}}.tgz -T -
- uses: actions/upload-artifact@v4
if: ${{ failure() || success() }}
with:
name: tests-output-unit-${{ matrix.current }}
path: tests-report-*.tgz
it-tests:
needs: build
timeout-minutes: 30
strategy:
fail-fast: false
matrix: ${{fromJson(needs.build.outputs.matrix-it)}}
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{env.HEAD_SHA}}
- uses: actions/setup-node@v4
with:
node-version: '24.9.0'
- uses: pnpm/action-setup@v3
with:
version: '8.6.11'
- uses: oven-sh/setup-bun@v2
with:
bun-version: 'latest'
- 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.8.7
- name: Set flow version to 999.99-SNAPSHOT
run: |
./scripts/computeMatrix.js set-version --version=999.99-SNAPSHOT
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- uses: actions/download-artifact@v4
if: ${{ github.run_attempt == 1 }}
with:
name: saved-workspace
- name: Restore Workspace
if: ${{ github.run_attempt == 1 }}
run: |
tar xf workspace.tar
tar cf - .m2 | (cd ~ && tar xf -)
- name: Compile and Install Flow
if: ${{ github.run_attempt > 1 }}
run: |
./scripts/computeMatrix.js set-version --version=999.99-SNAPSHOT
cmd="mvn install -B -ntp -DskipTests -pl \!flow-plugins/flow-gradle-plugin"
eval $cmd -T 2C -q || eval $cmd
- name: Set TB License
run: |
TB_LICENSE=${{secrets.TB_LICENSE}}
mkdir -p ~/.vaadin/
echo '{"username":"'`echo $TB_LICENSE | cut -d / -f1`'","proKey":"'`echo $TB_LICENSE | cut -d / -f2`'"}' > ~/.vaadin/proKey
- name: Compile Shared modules
run: |
if [ ${{matrix.current}} -eq 2 -o ${{matrix.current}} -eq 3 ]; then
cmd="mvn install -B -ntp -DskipTests -Pit-shared-modules -amd -pl flow-tests"
$cmd -T 1C || $cmd
fi
if [ ${{matrix.current}} -eq 4 -o ${{matrix.current}} -eq 5 -o ${{matrix.current}} -eq 6 ]; then
cmd="mvn install -B -ntp -DskipTests -Pit-shared-spring-modules -amd -pl flow-tests"
$cmd -T 1C || $cmd
fi
- name: Run ITs
run: |
[ -n "${{matrix.module}}" ] && \
ARGS="-Dfailsafe.forkCount=4 -pl ${{matrix.module}} -Dit.test=${{matrix.args}}" || \
ARGS="-pl ${{matrix.args}}"
cmd="mvn -V -B -ntp -e -fae -Dcom.vaadin.testbench.Parameters.testsInParallel=5 -Dfailsafe.rerunFailingTestsCount=2 -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 -Pbun $ARGS"
set -x -e -o pipefail
$cmd verify | tee -a mvn-it-tests-${{matrix.current}}.out
- name: Package test-report files
if: ${{ failure() || success() }}
run: find . -name surefire-reports -o -name failsafe-reports -o -name error-screenshots -o -name "mvn-*.out" | tar -czf tests-report-it-${{matrix.current}}.tgz -T -
- uses: actions/upload-artifact@v4
if: ${{ failure() || success() }}
with:
name: tests-output-it-${{ matrix.current }}
path: tests-report-*.tgz
test-results:
permissions:
actions: write
issues: read
checks: write
pull-requests: write
if: ${{ failure() || success() }}
needs: [unit-tests, it-tests]
runs-on: ubuntu-24.04
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: tests-output
pattern: tests-output-*
- uses: actions/checkout@v4
with:
ref: ${{env.HEAD_SHA}}
- uses: actions/download-artifact@v4
with:
name: tests-output
- name: extract downloaded files
run: for i in *.tgz; do tar xvf $i; done
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
junit_files: '**/target/*-reports/TEST*.xml'
check_run_annotations: all tests, skipped tests
- uses: geekyeggo/delete-artifact@v4
with:
name: |
saved-workspace
- name: Compute Stats
run: |
./scripts/computeMatrix.js test-results >> $GITHUB_STEP_SUMMARY
- 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
api-diff-labeling:
needs: check-permissions
if: github.event_name == 'pull_request_target'
timeout-minutes: 10
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
!~/.m2/repository/com/vaadin
key: ${{ runner.os }}-maven-api-diff-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Determine base version
id: base-version
run: |
baseVersion=$(mvn -N -q -DforceStdout help:evaluate -Dexpression='project.version')
echo "Base API Version: ${baseVersion}"
echo "BASE_API_VERSION=${baseVersion}" >> $GITHUB_OUTPUT
- name: Use temporary flow version
run: |
mvn versions:set -DnewVersion=1111.3.2-SNAPSHOT -B
- 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