diff --git a/.github/workflows/reusable_prepare_server_build.yaml b/.github/workflows/reusable_prepare_server_build.yaml new file mode 100644 index 00000000..78c395d3 --- /dev/null +++ b/.github/workflows/reusable_prepare_server_build.yaml @@ -0,0 +1,21 @@ +name: Prepare server for build + +on: workflow_call +runs: + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + - name: Define Gradle cache + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- \ No newline at end of file diff --git a/.github/workflows/run_tests.yaml b/.github/workflows/run_tests.yaml index acf02794..d1c1275f 100644 --- a/.github/workflows/run_tests.yaml +++ b/.github/workflows/run_tests.yaml @@ -9,22 +9,8 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - - name: Define Gradle cache - uses: actions/cache@v2 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- + - name: Prepare build server + run: 4sh/datamaintain-monitoring/.github/workflows/reusable_preapre_server_build.yaml@v1 - name: Build run: ./gradlew build --build-cache --console plain