Skip to content

feat: Add Lineage Enablement Cache #33

feat: Add Lineage Enablement Cache

feat: Add Lineage Enablement Cache #33

Workflow file for this run

# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: PR Checks
on:
pull_request:
branches: main
jobs:
pr-checks:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Make gradlew executable
run: chmod +x gradlew
- name: Run Google Java Format verification
run: ./gradlew verGJF
- name: Run Checkstyle
id: run-checkstyle
run: ./gradlew checkstyleMain checkstyleTest
- name: Build project
run: ./gradlew build shadowJar
- name: Run tests
id: run-tests
run: ./gradlew test
- name: Run additional checks
run: ./gradlew check
- name: Upload test results
uses: actions/upload-artifact@v4
if: always() && (steps.run-tests.outcome == 'success' || steps.run-tests.outcome == 'failure')
with:
name: test-results
path: |
lib/build/reports/tests/
lib/build/test-results/
- name: Upload checkstyle results
uses: actions/upload-artifact@v4
if: always() && (steps.run-checkstyle.outcome == 'success' || steps.run-checkstyle.outcome == 'failure')
with:
name: checkstyle-results
path: lib/build/reports/checkstyle/