Skip to content

test pr 2

test pr 2 #1

Workflow file for this run

name: .build-backend.yaml

Check failure on line 1 in .github/workflows/.test.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/.test.yaml

Invalid workflow file

No steps defined in `steps` and no workflow called in `uses` for the following jobs: pull-request-verified
on:
workflow_call:
jobs:
verify-pull-request:
name: Verify pull request
working-directory: apps/${{ env.APP_NAME }}
runs-on: ubuntu-latest-8-cores
outputs:
type: ${{ steps.verify-type.outputs.type }}
steps:
- id: verify-type
run: |
[ -f "package.json" ] && echo "type=frontend" || echo "type=backend" >> "$GITHUB_OUTPUT"
test-backend:
name: Verify pull request (backend)
if: needs.verify-pull-request.outputs.type == 'backend'
needs: verify-pull-request
runs-on: ubuntu-latest-8-cores
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Gradle test and build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew :apps:${{ github.workflow }}:test --stacktrace --configuration-cache
test-frontend:
name: Verify pull request (frontend)
if: needs.verify-pull-request.outputs.type == 'frontend'
needs: verify-pull-request
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'yarn'
cache-dependency-path: apps/${{ env.APP_NAME }}/client/yarn.lock
- name: Install client
working-directory: apps/${{ env.APP_NAME }}
run: yarn --cwd client install --frozen-lockfile && yarn --cwd client build
- name: Install server
working-directory: apps/${{ env.APP_NAME }}
run: yarn --cwd server install --frozen-lockfile && yarn --cwd server build
- name: Run tests
working-directory: apps/${{ env.APP_NAME }}/client
run: CI=true yarn test
pull-request-verified:
name: Verified OK
needs: [test-frontend, test-backend]
runs-on: ubuntu-latest