refactor(website): render the whole layout in React (#983) #1700
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: End-to-end Tests | |
| on: [push] | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./website | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: lts/* | |
| - name: Cache .npm | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-${{ hashFiles('lapis-e2e/**/package-lock.json') }} | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install Playwright Browsers | |
| run: npx playwright install --with-deps | |
| - name: Docker metadata | |
| id: dockerMetadata | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: "dummyImageName" | |
| tags: | | |
| type=ref,event=branch,enable=${{ github.ref != 'refs/heads/main' }} | |
| type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} | |
| - name: Get Branch Tag | |
| id: branchTag | |
| env: | |
| TAG: ${{ steps.dockerMetadata.outputs.tags }} | |
| run: echo "branchTag=${TAG##*:}" >> $GITHUB_OUTPUT | |
| - name: Wait for website Docker image | |
| uses: lewagon/wait-on-check-action@v1.4.1 | |
| with: | |
| ref: ${{ github.sha }} | |
| check-name: Build Website Docker Image | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| wait-interval: 10 | |
| - name: Wait for backend Docker image | |
| uses: lewagon/wait-on-check-action@v1.4.1 | |
| with: | |
| ref: ${{ github.sha }} | |
| check-name: Build Backend Docker Image | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| wait-interval: 5 | |
| - name: Start Docker Containers | |
| run: docker compose -f ../docker-compose.yml up -d --wait | |
| env: | |
| WEBSITE_TAG: ${{ steps.branchTag.outputs.branchTag }} | |
| BACKEND_TAG: ${{ steps.branchTag.outputs.branchTag }} | |
| - name: Run Playwright tests (all browsers) | |
| if: github.ref == 'refs/heads/main' | |
| run: npm run e2e | |
| - name: Run Playwright tests (chromium only) | |
| if: github.ref != 'refs/heads/main' | |
| run: npm run e2e:chromium | |
| - uses: actions/upload-artifact@v6 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: playwright-report | |
| path: website/playwright-report/ | |
| retention-days: 30 |