Skip to content

Merge pull request #5 from HiDeoo/hd-fix-tests #28

Merge pull request #5 from HiDeoo/hd-fix-tests

Merge pull request #5 from HiDeoo/hd-fix-tests #28

Workflow file for this run

name: integration
on:
push:
branches:
- '**'
tags-ignore:
- '**'
pull_request:
jobs:
lint_test:
name: Lint & Test
strategy:
matrix:
os: [ubuntu-latest]
# os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
# Run on external PRs only as the workflow will be already running for the push event on the branch for internal
# PRs.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 14
- name: Install pnpm
uses: pnpm/action-setup@v2.2.2
with:
version: 7.4.0
run_install: false
- name: Get pnpm store directory path
id: pnpm-store-dir-path
run: echo "::set-output name=dir::$(pnpm store path)"
- name: Setup pnpm store cache
uses: actions/cache@v3
id: pnpm-store-cache
with:
path: ${{ steps.pnpm-store-dir-path.outputs.dir }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install dependencies
run: pnpm install
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
- name: Set Playwright path (Unix)
if: runner.os != 'Windows'
run: echo "PLAYWRIGHT_BROWSERS_PATH=$HOME/.cache/playwright-bin" >> $GITHUB_ENV
- name: Set Playwright path (Windows)
if: runner.os == 'Windows'
run: echo "PLAYWRIGHT_BROWSERS_PATH=$HOME\.cache\playwright-bin" >> $env:GITHUB_ENV
- name: Setup Playwright cache
uses: actions/cache@v3
with:
path: ${{ env.PLAYWRIGHT_BROWSERS_PATH }}
key: ${{ runner.os }}-playwright
- name: Install Playwright browsers
run: pnpx playwright install chromium
- name: Lint
run: pnpm lint
- name: Test
uses: GabrielBB/xvfb-action@v1
with:
run: pnpm test