Skip to content

Commit be218fd

Browse files
Andreas Frömericanhazstring
authored andcommitted
Replace travis build with github action
1 parent ffd4f62 commit be218fd

File tree

2 files changed

+90
-23
lines changed

2 files changed

+90
-23
lines changed
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: CI Pipeline
2+
on:
3+
push:
4+
branches:
5+
- "[0-9]+.[0-9]+.x"
6+
pull_request:
7+
8+
jobs:
9+
10+
coding-standard:
11+
name: "Coding Standard"
12+
runs-on: "${{ matrix.operating-system }}"
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
operating-system: ['ubuntu-latest']
17+
php-version: ['7.4']
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v2
21+
22+
- name: Setup PHP
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: ${{ matrix.php-version }}
26+
tools: "composer:v2"
27+
28+
- name: Install dependencies
29+
run: composer install --no-progress --prefer-dist --optimize-autoloader
30+
31+
- name: Check codestyle
32+
run: vendor/bin/phpcs -s
33+
34+
static-analysis:
35+
name: "Static Analysis"
36+
runs-on: "${{ matrix.operating-system }}"
37+
38+
strategy:
39+
fail-fast: true
40+
matrix:
41+
php-version: ['7.4']
42+
operating-system: ['ubuntu-latest']
43+
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@v2
47+
48+
- name: Setup PHP
49+
uses: shivammathur/setup-php@v2
50+
with:
51+
php-version: ${{ matrix.php-version }}
52+
tools: "composer:v2"
53+
54+
- name: Install dependencies
55+
run: composer install --no-progress --prefer-dist --optimize-autoloader
56+
57+
- name: Analyze code with static-analysis
58+
run: vendor/bin/phpstan analyse --no-progress
59+
60+
unit-tests:
61+
name: "Unit Tests"
62+
63+
runs-on: "${{ matrix.operating-system }}"
64+
continue-on-error: "${{ matrix.experimental }}"
65+
66+
strategy:
67+
fail-fast: false
68+
matrix:
69+
php-version: ["7.2", "7.3", "7.4", "8.0"]
70+
operating-system: "ubuntu-latest"
71+
experimental: [false]
72+
include:
73+
- php: "8.0"
74+
composer-options: "--ignore-platform-req=php"
75+
76+
steps:
77+
- name: Checkout
78+
uses: actions/checkout@v2
79+
80+
- name: Setup PHP
81+
uses: shivammathur/setup-php@v2
82+
with:
83+
php-version: ${{ matrix.php-version }}
84+
tools: "composer:v2"
85+
86+
- name: Install dependencies
87+
run: composer install --no-progress --prefer-dist --optimize-autoloader ${{ matrix.composer-options }}
88+
89+
- name: Execute tests
90+
run: vendor/bin/phpunit --colors=always --coverage-text

.travis.yml

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

0 commit comments

Comments
 (0)