Tweak visual tests #304
Workflow file for this run
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
name: PR checks | |
env: | |
PLAYWRIGHT_VERSION: 1.39.0 | |
on: | |
push: | |
branches: [ main, develop ] | |
pull_request: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup node, pnpm, install dependencies | |
uses: ./.github/actions/setup | |
- name: Run linter | |
run: pnpm lint | |
e2e: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup script .env | |
run: | | |
touch ./scripts/setup/.env | |
echo "DB_USERNAME=dev" >> ./scripts/setup/.env | |
echo "DB_PASSWORD=dev" >> ./scripts/setup/.env | |
- name: Setup app .env | |
run: | | |
touch .env | |
echo "EMAIL_SENDER_NAME=Tailor" >> .env | |
echo "EMAIL_SENDER_ADDRESS=tailor@gostudion.com" >> .env | |
echo "EMAIL_USER=${{ secrets.EMAIL_USER }}" >> .env | |
echo "EMAIL_PASSWORD=${{ secrets.EMAIL_PASSWORD }}" >> .env | |
echo "EMAIL_HOST=sandbox.smtp.mailtrap.io" >> .env | |
- name: Setup E2E .env | |
run: | | |
touch ./tests/.env | |
echo "MAILTRAP_ACCOUNT_ID=${{ secrets.MAILTRAP_ACCOUNT_ID }}" >> ./tests/.env | |
echo "MAILTRAP_TOKEN=${{ secrets.MAILTRAP_TOKEN }}" >> ./tests/.env | |
echo "MAILTRAP_INBOX_ID=${{ secrets.MAILTRAP_INBOX_ID }}" >> ./tests/.env | |
echo "MAILTRAP_INBOX_NAME=e2e" >> ./tests/.env | |
echo "PERCY_TOKEN=${{ secrets.PERCY_TOKEN }}" >> ./tests/.env | |
- name: Install, build, seed, and start server | |
uses: ./.github/actions/run | |
- name: Run functional tests | |
shell: bash | |
run: pnpm e2e:functional | |
- name: Run visual tests | |
shell: bash | |
run: pnpm e2e:visual | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report | |
path: ./tests/playwright-report/ | |
retention-days: 1 |