Marvin/frontend test #87
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Backend CI | |
| on: | |
| push: | |
| branches: ["test/*"] | |
| pull_request: | |
| branches: ["main"] | |
| permissions: | |
| contents: read | |
| jobs: | |
| spring-tests: | |
| name: Spring Boot - ${{ matrix.service }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - service: application | |
| directory: services/application | |
| java-version: "25" | |
| - service: chat | |
| directory: services/chat-database | |
| java-version: "25" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Set up JDK ${{ matrix.java-version }} | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: ${{ matrix.java-version }} | |
| distribution: temurin | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v6 | |
| - name: Grant execute permission for Gradle wrapper | |
| run: chmod +x ./gradlew | |
| working-directory: ${{ matrix.directory }} | |
| - name: Run tests and static analysis | |
| run: ./gradlew check | |
| working-directory: ${{ matrix.directory }} | |
| - name: Publish test report | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: gradle-test-report-${{ matrix.service }} | |
| path: ${{ matrix.directory }}/build/reports/tests/test/ | |
| if-no-files-found: ignore | |
| python-tests: | |
| name: Python - ${{ matrix.service }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - service: genai | |
| directory: services/genai | |
| python-version: "3.12" | |
| - service: game-engine | |
| directory: services/game-engine | |
| python-version: "3.12" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| version: "latest" | |
| enable-cache: true | |
| cache-dependency-glob: ${{ matrix.directory }}/uv.lock | |
| cache-suffix: ${{ matrix.service }} | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Install Python dependencies | |
| run: uv sync --frozen | |
| working-directory: ${{ matrix.directory }} | |
| - name: Run Python unit tests | |
| run: uv run pytest | |
| working-directory: ${{ matrix.directory }} | |
| - name: Run Python linting | |
| run: uv run ruff check . | |
| working-directory: ${{ matrix.directory }} | |
| frontend-quality: | |
| name: Frontend quality checks | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: services/frontend | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.33.0 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| cache: pnpm | |
| cache-dependency-path: services/frontend/pnpm-lock.yaml | |
| - name: Install frontend dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run frontend linting | |
| run: pnpm lint | |
| - name: Run TypeScript static analysis | |
| run: pnpm typecheck | |
| - name: Build frontend | |
| run: pnpm build |