Skip to content

Commit

Permalink
Setup GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
efoken committed Nov 30, 2024
1 parent 0fe65ef commit 501d63a
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Node.js CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'

- name: Install dependencies
run: yarn install --immutable

- name: Get installed Playwright version
run: echo "PLAYWRIGHT_VERSION=$(yarn info playwright --json | jq '.children.Version')" >> $GITHUB_ENV

- name: Cache Playwright binaries
uses: actions/cache@v3
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

0 comments on commit 501d63a

Please sign in to comment.