Skip to content

Chore/pw e2e

Chore/pw e2e #11

name: Unit and screenshot tests
on:
pull_request:
jobs:
test:
name: Unit and screenshot tests
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
cache: "yarn"
- name: Install dependencies
run: yarn install
- name: Run unit tests
run: yarn test
- name: Build Docker image
run: docker build -t playwright-tests -f Dockerfile.tests .
- name: Run screenshot tests on Docker
run: docker run --rm -e CI=true -v $(pwd)/test-results:/app/test-results playwright-tests
- name: Archive artifacts
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: screenshots-report
path: test-results