Skip to content

GitHub actions

GitHub actions #36

name: Landonlite Backend Workflow
on:
pull_request:
branches:
- "master"
jobs:
compare-changes:
uses: ./.github/workflows/compare-changes.yml
print-compare-changes-output:
runs-on: ubuntu-latest
needs: compare-changes
steps:
- run: echo "BackendDisable ${{ needs.compare-changes.outputs.backendDisable }}"
- run: printf "backendDisable ${{ needs.Compare-changes.outputs.backendDisable == 'true' }}\n"
printf "playwrightDisable ${{ needs.Compare-changes.outputs.playwrightDisable == 'true' }}"
skip-backend-test:
needs:
- compare-changes
if: ${{ needs.compare-changes.outputs.backendDisable == true }}
runs-on: ubuntu-latest
steps:
- run: echo "Skipping frontend tests"
backend-tests:
needs:
- compare-changes
if: ${{ needs.compare-changes.outputs.backendDisable == false }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 17
- name: Cache Gradle packages
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: Grant execute permission for gradlew
run: chmod +x ./gradlew
# - name: Build with Gradle
# run: ./gradlew build
# - name: Run tests
# run: ./gradlew test