forked from less/less.js
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (46 loc) · 1.46 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Github actions workflow name
name: CI
# Triggers the workflow on push or pull request events
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
test:
name: 'Tests on ${{matrix.os}} with Node "${{matrix.node}}"'
strategy:
matrix:
# Test all mainstream operating systems
os: [ubuntu-latest, macos-latest, windows-latest]
node: ['current']
include:
- os: ubuntu-latest
node: 'lts/*'
- os: ubuntu-latest
node: 'lts/-1'
- os: ubuntu-latest
node: 'lts/-2'
- os: ubuntu-latest
node: 'lts/-3'
runs-on: ${{ matrix.os }}
# This has copy/paste steps and should be refactored using DRY
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Print put node & npm version
run: node --version && pnpm --version
# Pin the version of Playwright to match package.json to avoid installing a newer version which may expect different binaries
- name: Install chromium
run: npx [email protected] install chromium
- name: Run unit test
run: pnpm run test