-
-
Notifications
You must be signed in to change notification settings - Fork 14
65 lines (53 loc) · 1.52 KB
/
main.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 5
strategy:
fail-fast: false
# max-parallel: 2
matrix:
node-version: [16, 18, 20, 22]
os: [ubuntu-latest, windows-latest, macos-latest]
# test only nodejs v18 on win and mac
exclude:
- os: macos-latest
node-version: 16
- os: macos-latest
node-version: 20
- os: macos-latest
node-version: 22
- os: windows-latest
node-version: 16
- os: windows-latest
node-version: 20
- os: windows-latest
node-version: 22
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup PHP for macos
if: matrix.os == 'macos-latest'
uses: shivammathur/setup-php@v2
with:
tools: none
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
- name: Build Packages
run: npm run build
- name: Run Tests
run: npm test
- name: Run Prettier
if: matrix.os == 'ubuntu-latest'
run: npm run format
- name: Run ESLint
if: matrix.os == 'ubuntu-latest'
run: npm run lint
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v2