Skip to content

Commit b265b6c

Browse files
authored
Switch to GitHub Actions (#11)
Switch to GitHub Actions
1 parent 547e058 commit b265b6c

File tree

2 files changed

+62
-19
lines changed

2 files changed

+62
-19
lines changed

.github/workflows/test.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
php-versions:
20+
- '5.5'
21+
- '5.6'
22+
- '7.0'
23+
- '7.1'
24+
- '7.2'
25+
# - '8.0'
26+
# - '8.1'
27+
# - '8.2'
28+
# - '8.3'
29+
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- name: Setup PHP
34+
uses: shivammathur/setup-php@v2
35+
with:
36+
php-version: ${{ matrix.php-versions }}
37+
ini-values: zend.assertions=1, assert.exception=1
38+
39+
- name: Validate composer.json
40+
run: composer validate --strict
41+
42+
- name: Cache Composer packages
43+
id: composer-cache
44+
uses: actions/cache@v4
45+
with:
46+
path: vendor
47+
key: ${{ runner.os }}-php-${{ matrix.php-versions }}-${{ hashFiles('composer.json') }}
48+
restore-keys: |
49+
${{ runner.os }}-php-${{ matrix.php-versions }}
50+
51+
- name: Install dependencies
52+
run: composer install --prefer-dist --no-progress
53+
54+
- name: Run the unit tests
55+
run: |
56+
vendor/bin/phpunit tests/
57+
58+
services:
59+
redis:
60+
image: redis:7.4
61+
ports:
62+
- 6379:6379

.travis.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)