Skip to content

Add install action and run lint #43

Add install action and run lint

Add install action and run lint #43

Workflow file for this run

name: Node.js CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/install
- run: yarn lint
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/install
with:
node-version: ${{ matrix.node-version }}
- name: Get installed Playwright version
run: echo "PLAYWRIGHT_VERSION=$(yarn info playwright --json | jq -r '.children.Version')" >> $GITHUB_ENV
- name: Cache Playwright binaries
uses: actions/cache@v4
id: playwright-cache
with:
path: |
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'
- run: yarn test