Skip to content

Commit

Permalink
Added cache prepare step to build.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
alex268 committed Oct 16, 2024
1 parent 263c846 commit c794537
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,31 @@ on:
type: [opened, reopened, edited, synchronize]

jobs:
prepare:
name: Prepare Maven cache
runs-on: ubuntu-latest

env:
MAVEN_ARGS: --batch-mode -Dstyle.color=always

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
cache: 'maven'

- name: Download dependencies for JDBC
run: mvn $MAVEN_ARGS dependency:resolve-plugins dependency:go-offline

build:
name: Build JDBC Driver
runs-on: ubuntu-latest
needs: prepare

strategy:
matrix:
Expand Down Expand Up @@ -75,9 +97,6 @@ jobs:
if: env.NEED_SDK == 'true'
run: rm -rf yc

- name: Download dependencies
run: mvn $MAVEN_ARGS dependency:resolve-plugins dependency:go-offline

- name: Build with Maven
run: mvn $MAVEN_ARGS package

Expand Down Expand Up @@ -144,9 +163,6 @@ jobs:
if: env.NEED_SDK == 'true'
run: rm -rf yc

- name: Download dependencies
run: mvn $MAVEN_ARGS dependency:resolve-plugins dependency:go-offline

- name: Build with Maven
run: mvn $MAVEN_ARGS test

Expand Down

0 comments on commit c794537

Please sign in to comment.