Skip to content

Commit e8845ae

Browse files
authored
Merge pull request #11 from php-school/gh-actions
Replace travis with GH actions
2 parents bdd54f2 + a486641 commit e8845ae

File tree

2 files changed

+44
-26
lines changed

2 files changed

+44
-26
lines changed

.github/workflows/build.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: MyWorkshop
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
php: [7.3, 7.4, 8.0]
16+
17+
name: PHP ${{ matrix.php }}
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 }}
26+
tools: composer:v2,pecl
27+
extensions: pdo_sqlite
28+
29+
- name: Install Dependencies
30+
run: composer update
31+
32+
- name: Run phpunit tests
33+
run: |
34+
mkdir -p build/logs
35+
vendor/bin/simple-phpunit --coverage-clover ./build/logs/clover.xml
36+
- name: Run phpcs
37+
run: composer cs
38+
39+
- name: Run phpstan
40+
run: composer static
41+
42+
- name: Coverage upload
43+
if: matrix.php == '8.0'
44+
run: bash <(curl -s https://codecov.io/bash)

.travis.yml

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

0 commit comments

Comments
 (0)