AI-489 QA Workflows Fix #10
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 Quality Assurance | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| types: [opened, synchronize] | |
| branches: [main, develop] | |
| paths: | |
| - '.github/workflows/backend-qa.yml' | |
| - 'apps/backend-services/src/**' | |
| workflow_dispatch: | |
| jobs: | |
| get-environment: | |
| name: Prepare Environment | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./apps/backend-services | |
| outputs: | |
| environment: ${{ steps.env.outputs.environment }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Get Environment | |
| id: env | |
| uses: ./.github/actions/get-environment | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| - name: Cache node_modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: ./node_modules | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - name: Install dependencies | |
| run: npm i | |
| unit-tests: | |
| name: Unit Tests | |
| needs: get-environment | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./apps/backend-services | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| - name: Restore node_modules cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ./node_modules | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - name: Run tests | |
| run: npm test | |
| # - name: Run lint | |
| # run: npm run lint || true | |
| linting: | |
| name: Linting | |
| needs: get-environment | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./apps/backend-services | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| - name: Restore node_modules cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ./node_modules | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - name: Run Linter | |
| run: npm run lint | |
| # test-frontend: | |
| # name: Test Frontend | |
| # needs: get-environment | |
| # runs-on: ubuntu-latest | |
| # defaults: | |
| # run: | |
| # working-directory: apps/frontend | |
| # steps: | |
| # - name: Checkout | |
| # uses: actions/checkout@v4 | |
| # - name: Setup Node.js | |
| # uses: actions/setup-node@v4 | |
| # with: | |
| # node-version: '24' | |
| # cache: 'npm' | |
| # cache-dependency-path: apps/frontend/package-lock.json | |
| # - name: Install dependencies | |
| # run: npm ci | |
| # - name: Run lint | |
| # run: npm run lint | |
| # - name: Type check | |
| # run: npx tsc --noEmit | |