Skip to content

Commit c9466b5

Browse files
committed
feat(ci): replace travis with github action
1 parent cbcc991 commit c9466b5

File tree

3 files changed

+109
-23
lines changed

3 files changed

+109
-23
lines changed

.github/unit-tests.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Unit Tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
defaults:
8+
run:
9+
shell: bash
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
13+
cancel-in-progress: true
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
20+
tests:
21+
name: Unit Tests
22+
23+
strategy:
24+
matrix:
25+
include:
26+
- php: '8.0'
27+
- php: '8.1'
28+
- php: '8.2'
29+
- php: '8.3'
30+
- php: '8.4'
31+
fail-fast: false
32+
33+
runs-on: ubuntu-20.04
34+
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v4
38+
with:
39+
fetch-depth: 2
40+
41+
- name: Setup PHP
42+
uses: shivammathur/setup-php@v2
43+
with:
44+
coverage: "none"
45+
ini-values: date.timezone=UTC,memory_limit=-1,default_socket_timeout=10,session.gc_probability=0,apc.enable_cli=1,zend.assertions=1
46+
php-version: "${{ matrix.php }}"
47+
tools: flex
48+
49+
- name: Install dependencies
50+
run: composer install --prefer-dist --no-progress --no-suggest
51+
52+
- name: Run tests
53+
run: bin/phpunit --configuration phpunit.xml.dist

.github/workflows/unit-tests.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Unit Tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
defaults:
8+
run:
9+
shell: bash
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
13+
cancel-in-progress: true
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
20+
tests:
21+
name: Unit Tests
22+
23+
strategy:
24+
matrix:
25+
include:
26+
- php: '8.3'
27+
- php: '8.4'
28+
fail-fast: false
29+
30+
runs-on: ubuntu-20.04
31+
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v4
35+
with:
36+
fetch-depth: 2
37+
38+
- name: Setup PHP
39+
uses: shivammathur/setup-php@v2
40+
with:
41+
coverage: "none"
42+
ini-values: date.timezone=UTC,memory_limit=-1,default_socket_timeout=10,session.gc_probability=0,apc.enable_cli=1,zend.assertions=1
43+
php-version: "${{ matrix.php }}"
44+
tools: flex
45+
46+
- name: Install optional commands
47+
if: matrix.php == '8.4'
48+
run: |
49+
sudo apt-get update
50+
sudo apt-get install zopfli
51+
52+
- name: Install dependencies
53+
run: composer install --prefer-dist --no-progress --no-suggest
54+
55+
- name: Run tests
56+
run: bin/phpunit --configuration phpunit.xml.dist

.travis.yml

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

0 commit comments

Comments
 (0)