Skip to content

Commit b262935

Browse files
Add Github Actions
1 parent 05e87d4 commit b262935

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
php-version: [ '5.6', '7.4', '8.4' ]
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: ${{ matrix.php-version }}
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: '16'
27+
cache: 'npm'
28+
29+
- name: Cache Composer
30+
uses: actions/cache@v4
31+
with:
32+
path: ~/.composer/cache
33+
key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
34+
restore-keys: |
35+
${{ runner.os }}-composer-${{ matrix.php }}-
36+
37+
- name: Install dependencies
38+
run: npm ci
39+
40+
- name: Run linting
41+
run: npm run lint
42+
43+
- name: Run build
44+
run: npm run build

0 commit comments

Comments
 (0)