Merge pull request #3 from MikaeelMF/fix/constants-typo #55
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: Verification pipeline for each PR | |
| on: | |
| push: | |
| branches: | |
| - main | |
| env: | |
| NODE_VERSION: 24 | |
| jobs: | |
| lint: | |
| if: "!startsWith(github.event.head_commit.message, 'chore(release)')" | |
| environment: prod | |
| runs-on: ubuntu-latest | |
| name: Linting | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v6 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Generate Prisma types | |
| run: npm run db:generate | |
| - name: Linting | |
| run: npm run lint | |
| unit-tests: | |
| needs: lint | |
| environment: prod | |
| runs-on: ubuntu-latest | |
| name: Unit Tests | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v6 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Generate Prisma types | |
| run: npm run db:generate | |
| - name: Unit Tests | |
| run: npm test | |
| e2e-tests: | |
| needs: unit-tests | |
| environment: prod | |
| runs-on: ubuntu-latest | |
| name: E2E Tests | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v6 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Generate .env | |
| uses: ./.github/actions/generate-env | |
| with: | |
| DATABASE_SSL: false | |
| LOG_PRETTY: false | |
| - name: Generate Prisma types | |
| run: npm run db:generate | |
| - name: Run e2e tests | |
| run: npm run test:e2e | |
| build: | |
| needs: e2e-tests | |
| environment: prod | |
| runs-on: ubuntu-latest | |
| name: Build Application | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v6 | |
| - name: Generate .env | |
| uses: ./.github/actions/generate-env | |
| with: | |
| DATABASE_SSL: true | |
| LOG_PRETTY: false | |
| - name: Set up Docker Compose | |
| run: docker compose -f docker-compose.yml build production |