Skip to content

Commit a03c398

Browse files
authored
Use GitHub Actions (#253)
1 parent b8a9867 commit a03c398

File tree

7 files changed

+98
-105
lines changed

7 files changed

+98
-105
lines changed

.appveyor.yml

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

.github/workflows/ci.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: CI
2+
3+
on:
4+
pull_request: ~
5+
push:
6+
branches:
7+
- 'master'
8+
9+
jobs:
10+
analyse:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
16+
- name: Check trailing whitespaces
17+
run: ./dev-tools/check_trailing_whitespaces.sh
18+
19+
- name: Install dependencies
20+
run: composer update --no-progress --no-suggest
21+
22+
- name: Analyse
23+
run: composer analyse
24+
25+
test:
26+
strategy:
27+
matrix:
28+
os: [macos-latest, ubuntu-latest, windows-latest]
29+
php-version: ['7.4']
30+
include:
31+
- os: ubuntu-latest
32+
php-version: '7.2'
33+
composer_flags: '--prefer-lowest'
34+
- os: ubuntu-latest
35+
php-version: '7.2'
36+
- os: ubuntu-latest
37+
php-version: '7.3'
38+
runs-on: ${{ matrix.os }}
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v2
42+
43+
- name: Setup PHP
44+
uses: shivammathur/setup-php@v1
45+
with:
46+
php-version: ${{ matrix.php-version }}
47+
coverage: pcov
48+
49+
- name: Get composer cache directory
50+
id: composer-cache
51+
run: echo '::set-output name=dir::$(composer config cache-files-dir)'
52+
53+
- name: Cache dependencies
54+
uses: actions/cache@v1
55+
with:
56+
path: ${{ steps.composer-cache.outputs.dir }}
57+
key: ${{ runner.os }}-${{ hashFiles('**/composer.json') }}
58+
restore-keys: ${{ runner.os }}-
59+
60+
- name: Install dependencies
61+
run: composer update --no-progress --no-suggest ${{ matrix.composer_flags }}
62+
63+
# - name: Test
64+
# run: composer test -- --coverage-clover=./build/logs/clover.xml
65+
#
66+
# - name: Collect coverage
67+
# if: matrix.os == 'ubuntu-latest' && matrix.php-version == '7.4'
68+
# run: |
69+
# composer require --dev php-coveralls/php-coveralls
70+
# COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }} COVERALLS_RUN_LOCALLY=1 ./vendor/bin/php-coveralls -v

.travis.yml

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

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
![Repository size](https://github-size-badge.herokuapp.com/kubawerlos/php-cs-fixer-custom-fixers.svg)
77
[![Last commit](https://img.shields.io/github/last-commit/kubawerlos/php-cs-fixer-custom-fixers.svg)](https://github.com/kubawerlos/php-cs-fixer-custom-fixers/commits)
88

9-
[![Travis CI build status](https://img.shields.io/travis/kubawerlos/php-cs-fixer-custom-fixers/master.svg?label=Travis+CI)](https://travis-ci.org/kubawerlos/php-cs-fixer-custom-fixers)
10-
[![AppVeyor build status](https://img.shields.io/appveyor/ci/kubawerlos/php-cs-fixer-custom-fixers/master?label=AppVeyor)](https://ci.appveyor.com/project/kubawerlos/php-cs-fixer-custom-fixers)
9+
[![CI Status](https://github.com/kubawerlos/php-cs-fixer-custom-fixers/workflows/CI/badge.svg?branch=master&event=push)](https://github.com/kubawerlos/php-cs-fixer-custom-fixers/actions)
1110
[![Code coverage](https://img.shields.io/coveralls/github/kubawerlos/php-cs-fixer-custom-fixers/master.svg)](https://coveralls.io/github/kubawerlos/php-cs-fixer-custom-fixers?branch=master)
1211
![Tests](https://img.shields.io/badge/tests-2168-brightgreen.svg)
1312
[![Mutation testing badge](https://badge.stryker-mutator.io/github.com/kubawerlos/php-cs-fixer-custom-fixers/master)](https://stryker-mutator.github.io)

dev-tools/composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
"ergebnis/composer-normalize": "^2.3.2",
77
"friendsofphp/php-cs-fixer": "^2.16.1",
88
"infection/infection": "^0.15.3",
9-
"kubawerlos/types-checker": "^1.2.0",
9+
"kubawerlos/types-checker": "^2.0.0",
1010
"maglnet/composer-require-checker": "^2.1.0",
1111
"mi-schi/phpmd-extension": "^4.3.0",
1212
"phpmd/phpmd": "^2.8.2",
13-
"phpstan/phpstan": "^0.12.14",
13+
"phpstan/phpstan": "^0.12.18",
1414
"phpstan/phpstan-strict-rules": "^0.12.2",
1515
"phpunit/phpunit": "^9.0.1",
1616
"squizlabs/php_codesniffer": "^3.5.4",
17-
"vimeo/psalm": "^3.9.5"
17+
"vimeo/psalm": "^3.10.1"
1818
},
1919
"scripts": {
2020
"analyse": [

dev-tools/composer.lock

Lines changed: 21 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev-tools/src/Readme/ReadmeCommand.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,9 @@ private function badges(): string
7474
),
7575
'',
7676
$this->badge(
77-
'Travis CI build status',
78-
\sprintf('%s/travis/%s/master.svg?label=Travis+CI', self::SHIELDS_HOST, $this->composer()->name),
79-
\sprintf('https://travis-ci.org/%s', $this->composer()->name)
80-
),
81-
$this->badge(
82-
'AppVeyor build status',
83-
\sprintf('%s/appveyor/ci/%s/master?label=AppVeyor', self::SHIELDS_HOST, $this->composer()->name),
84-
\sprintf('https://ci.appveyor.com/project/%s', $this->composer()->name)
77+
'CI Status',
78+
\sprintf('https://github.com/%s/workflows/CI/badge.svg?branch=master&event=push', $this->composer()->name),
79+
\sprintf('https://github.com/%s/actions', $this->composer()->name)
8580
),
8681
$this->badge(
8782
'Code coverage',

0 commit comments

Comments
 (0)