feat: new login page (#120) #978
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
| permissions: | |
| contents: read | |
| pull-requests: read | |
| name: Build | |
| on: | |
| push: | |
| jobs: | |
| test: | |
| timeout-minutes: 60 | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:17 | |
| env: | |
| POSTGRES_USER: ecopass | |
| POSTGRES_PASSWORD: ecopass | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| maildev: | |
| image: maildev/maildev:latest | |
| ports: | |
| - 1080:1080 | |
| - 1025:1025 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Enable Corepack | |
| shell: bash | |
| run: corepack enable | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: "pnpm" | |
| - name: Copy .env | |
| run: cp .env.dist .env | |
| - name: Inject secrets into .env | |
| run: | | |
| echo "INSEE_API_KEY=${{ secrets.INSEE_API_KEY }}" >> .env | |
| echo "STORAGE_ENCRYPTION_KEY=${{ secrets.STORAGE_ENCRYPTION_KEY }}" >> .env | |
| echo "ENCRYPTION_KEY=${{ secrets.ENCRYPTION_KEY }}" >> .env | |
| echo "PROCONNECT_CLIENT_ID=${{ secrets.PROCONNECT_CLIENT_ID }}" >> .env | |
| echo "PROCONNECT_CLIENT_SECRET=${{ secrets.PROCONNECT_CLIENT_SECRET }}" >> .env | |
| echo "NEXT_PUBLIC_PROCONNECT_DOMAIN=${{ secrets.PROCONNECT_DOMAIN }}" >> .env | |
| echo "INSEE_API_KEY=${{ secrets.INSEE_API_KEY }}" >> .env | |
| echo "ECOBALYSE_ENCRYPTION_KEY=${{ secrets.ECOBALYSE_ENCRYPTION_KEY }}" >> .env | |
| echo "CI=true" >> .env | |
| echo "BATCH_SIZE=20" >> .env | |
| echo "NODE_ENV=production" >> .env | |
| echo "FORBID_RECENT_DECLARATION=true" >> .env | |
| echo "MAIL_HOST=localhost" >> .env | |
| echo "MAIL_PORT=1025" >> .env | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Linter | |
| run: pnpm lint | |
| - name: Run build | |
| run: pnpm build | |
| - name: Migrate db | |
| run: pnpm prisma migrate deploy | |
| - name: Seed db | |
| run: pnpm prisma db seed | |
| - name: Run unit tests | |
| run: pnpm jest --runInBand | |
| - name: Seed db | |
| run: pnpm prisma db seed | |
| - name: Decrypt Ecobalyse data | |
| run: pnpm ecobalyse:data | |
| - name: Start server | |
| run: pnpm start > server.txt & | |
| - name: Start queue | |
| run: pnpm queue > queue.txt & | |
| - name: Install Playwright browsers | |
| run: pnpm playwright install chromium | |
| - name: Run e2e tests | |
| run: pnpm playwright test | |
| - name: Create artifacts directory | |
| run: mkdir -p ${{ github.workspace }}/tmp/artifacts | |
| - name: Lighthouse Check | |
| uses: foo-software/lighthouse-check-action@master | |
| id: lighthouseCheck | |
| with: | |
| device: all | |
| urls: "http://localhost:3000,http://localhost:3000/professionnels,http://localhost:3000/informations,http://localhost:3000/marques,http://localhost:3000/marques/a1b2c3d4-e5f6-4a5b-9c8d-7e6f5a4b3c2d,http://localhost:3000/recherche,http://localhost:3000/produits/0000000000000" | |
| outputDirectory: ${{ github.workspace }}/tmp/artifacts | |
| - name: Verify Lighthouse Check results | |
| uses: foo-software/lighthouse-check-status-action@master | |
| with: | |
| lighthouseCheckResults: ${{ steps.lighthouseCheck.outputs.lighthouseCheckResults }} | |
| minAccessibilityScore: "100" | |
| minBestPracticesScore: "100" | |
| - name: Upload Lighthouse artifacts | |
| uses: actions/upload-artifact@v5 | |
| if: always() | |
| with: | |
| name: Lighthouse reports | |
| path: ${{ github.workspace }}/tmp/artifacts | |
| - name: Upload playwright artifacts | |
| uses: actions/upload-artifact@v5 | |
| if: always() | |
| with: | |
| name: playwright-report | |
| path: test-results/ | |
| retention-days: 7 | |
| - name: Upload queue artifacts | |
| uses: actions/upload-artifact@v5 | |
| if: failure() | |
| with: | |
| name: queue-report | |
| path: queue.txt | |
| retention-days: 7 | |
| - name: Upload server artifacts | |
| uses: actions/upload-artifact@v5 | |
| if: failure() | |
| with: | |
| name: server-report | |
| path: server.txt | |
| retention-days: 7 |