chore(deps): update patrickedqvist/wait-for-vercel-preview action to v1.3.2 #37
This file contains 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
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | |
name: CI | |
on: | |
pull_request: | |
branches: | |
- dev | |
- master | |
jobs: | |
unit-test: | |
name: unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 # Specify the pnpm version you want to use | |
- name: Set node version to 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: "pnpm" | |
- run: pnpm install | |
- name: Run unit tests | |
run: pnpm run test:unit | |
e2e_tests_setup: | |
name: setup end-to-end tests | |
runs-on: ubuntu-latest | |
outputs: | |
preview_url: ${{ steps.waitForVercelPreviewDeployment.outputs.url }} | |
steps: | |
- name: Wait for Vercel preview deployment to be ready | |
uses: patrickedqvist/wait-for-vercel-preview@v1.3.2 | |
id: waitForVercelPreviewDeployment | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
max_timeout: 600 | |
e2e_tests: | |
needs: e2e_tests_setup | |
name: end-to-end tests | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 # Specify the pnpm version you want to use | |
- name: Set node version to 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: "pnpm" | |
- run: pnpm install | |
- name: Install Playwright Browsers | |
run: pnpm exec playwright install --with-deps | |
- name: Run Playwright tests | |
run: pnpm run test:e2e | |
env: | |
E2E_TEST_BASE_URL: ${{ needs.e2e_tests_setup.outputs.preview_url }} | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 |