Update builds.e2e-spec.ts #941
Workflow file for this run
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: CI | |
| on: [push] | |
| jobs: | |
| build: | |
| # https://github.com/actions/runner-images#available-images | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js environment | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Static analysis | |
| run: npm run lint | |
| - name: Check formatting | |
| run: npm run format:check | |
| - name: Unit tests | |
| run: npm run test:cov | |
| - name: Build and run containers | |
| run: docker compose up --build -d | |
| - name: Run acceptance tests | |
| run: npm run test:acceptance | |
| - name: Run e2e tests | |
| run: npm run test:e2e | |
| - name: Dump docker logs on failure | |
| if: failure() | |
| uses: jwalton/gh-docker-logs@v2 | |
| - name: Stop containers | |
| if: always() | |
| run: docker compose down | |
| - name: Run ldap containers | |
| run: docker compose -f docker-compose.yml -f docker-compose.ldap.yml up -d | |
| - name: Run ldap test | |
| run: npm run test:ldap | |
| - name: Dump docker logs on failure | |
| if: failure() | |
| uses: jwalton/gh-docker-logs@v2 | |
| - name: Stop ldap containers | |
| if: always() | |
| run: docker compose -f docker-compose.yml -f docker-compose.ldap.yml down | |
| - name: SonarCloud Scan | |
| uses: SonarSource/sonarqube-scan-action@v6 | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} | |
| test-migrations: | |
| # See: https://github.com/Visual-Regression-Tracker/backend/issues/273 | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js environment | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install npm dependencies | |
| working-directory: prisma | |
| run: npm ci | |
| - name: Static analysis | |
| working-directory: prisma | |
| run: npm run test |