Skip to content

Sync lockfile self-version to 0.104.0 and track it in .codegen.json #2655

Sync lockfile self-version to 0.104.0 and track it in .codegen.json

Sync lockfile self-version to 0.104.0 and track it in .codegen.json #2655

Workflow file for this run

name: build
on:
pull_request:
types: [opened, synchronize]
merge_group:
types: [checks_requested]
permissions:
id-token: write
contents: read
jobs:
fmt:
runs-on:
group: databricks-protected-runner-group
labels: linux-ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Cache Maven packages
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Setup build environment
uses: ./.github/actions/setup-build-environment
with:
java-version: 11
- name: Check formatting
run: mvn --errors spotless:check
- name: Check for JFrog proxy URLs in lockfiles
run: |
make fix-lockfile
git diff --exit-code -- '**/lockfile.json'
unit-tests:
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest]
java-version: [8, 11, 17, 20] # 20 is the latest version as of 2023 and 17 is the latest LTS
include:
- os: ubuntu-latest
runner:
group: databricks-protected-runner-group
labels: linux-ubuntu-latest
- os: macos-latest
runner: macos-latest
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Cache Maven packages
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Setup build environment
uses: ./.github/actions/setup-build-environment
with:
java-version: ${{ matrix.java-version }}
- name: Check Unit Tests
run: mvn --errors test
check-lock:
runs-on:
group: databricks-protected-runner-group
labels: linux-ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Cache Maven packages
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Setup build environment
uses: ./.github/actions/setup-build-environment
with:
java-version: 11
- name: Validate lockfile
run: make check-lock
regenerate-lock:
if: github.event_name == 'pull_request' && github.head_ref == 'mihaimitrea-db/fix-lockfile-v0.104.0'
runs-on:
group: databricks-protected-runner-group
labels: linux-ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- name: Checkout PR branch
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
with:
ref: ${{ github.head_ref }}
persist-credentials: true
- name: Setup build environment
uses: ./.github/actions/setup-build-environment
with:
java-version: 11
- name: Regenerate lockfile
run: |
make lock
make fix-lockfile
- name: Commit and push regenerated lockfile
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
if git diff --quiet -- '**/lockfile.json'; then
echo "No lockfile changes to commit."
exit 0
fi
git add '**/lockfile.json'
git commit -m "Regenerate lockfile via CI"
git push origin HEAD:${{ github.head_ref }}