Skip to content

Feat/e2e pipeline #1193

Feat/e2e pipeline

Feat/e2e pipeline #1193

Workflow file for this run

name: Pull request checks
on:
pull_request:
branches:
- V2
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
if: github.event.action == 'opened' || github.event.action == 'synchronize'
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup-node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: install
run: npm ci
- name: build
run: npm run build
env:
NEXT_PUBLIC_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_PROJECT_ID }}
code_style:
runs-on: ubuntu-latest
strategy:
matrix:
style-command:
- lint
- prettier
- typecheck
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup-node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: install
run: npm ci
- name: check
run: npm run ${{ matrix.style-command }}
e2e_tests:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup-node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: install deps
run: npm ci
- name: build
run: npm run build
env:
NEXT_PUBLIC_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_PROJECT_ID }}
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
working-directory: ./laboratory
run: npx playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: ./laboratory/playwright-report/
retention-days: 30