Skip to content

Update js packages (#722) #285

Update js packages (#722)

Update js packages (#722) #285

Workflow file for this run

name: Continuous integration
on: [push]
jobs:
runner-job:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install pnpm
run: npm install -g pnpm
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- uses: actions/cache@v3
name: Setup Playwright browsers cache
with:
path: /home/runner/.cache/ms-playwright/
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-playwright-
- name: Install packages
run: |
pnpm install
- name: Build
run: |
pnpm run production
- name: Lint
run: |
pnpm run lint
- name: Check types
run: |
pnpm run tsc
- name: Clean coverage
run: rm -rf .nyc_output && npx jest --clearCache
- name: Run jest tests
run: pnpm run jest
- name: Playwright install
run: npx playwright install chromium
- name: Run playwright tests
run: pnpm run playwright
- name: Screenshots artifact
if: always()
uses: actions/upload-artifact@v3
with:
name: screenshots
path: src/playwright/playwright.test.ts-snapshots/
- name: Merge coverage
run: cp jest-coverage/coverage-final.json .nyc_output/coverage_jsdom.json
- name: Coverage artifact
uses: actions/upload-artifact@v3
with:
name: coverage
path: .nyc_output
- name: Codecov
uses: codecov/codecov-action@v3
with:
directory: .nyc_output
verbose: true