Skip to content

Commit 67892a7

Browse files
authored
Migrate to Github Actions (#13)
1 parent 0e40256 commit 67892a7

5 files changed

Lines changed: 130 additions & 15 deletions

File tree

.github/workflows/tests.yml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
env:
10+
CI: "true"
11+
12+
jobs:
13+
phpunit:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
composer:
18+
# - low
19+
- high
20+
php:
21+
- 7.2
22+
- 7.3
23+
- 7.4
24+
# - 8.0
25+
26+
steps:
27+
- name: Check out code
28+
uses: actions/checkout@v2
29+
30+
- name: Setup PHP
31+
uses: shivammathur/setup-php@v2
32+
with:
33+
coverage: xdebug
34+
ini-values: zend.assertions=1, assert.exception=1
35+
php-version: ${{ matrix.php }}
36+
37+
# TODO: build cache
38+
39+
- name: Install dependencies
40+
run: composer install --no-interaction --no-ansi --no-progress --no-suggest --prefer-dist --optimize-autoloader
41+
# todo: prefer-lowest
42+
43+
- name: PHPUnit
44+
run: vendor/bin/phpunit
45+
46+
- name: Submit code coverage
47+
run: bash <(curl -s https://codecov.io/bash)
48+
49+
phpstan:
50+
runs-on: ubuntu-latest
51+
strategy:
52+
matrix:
53+
composer:
54+
# - low
55+
- high
56+
php:
57+
- 7.2
58+
- 7.3
59+
- 7.4
60+
# - 8.0
61+
62+
steps:
63+
- name: Check out code
64+
uses: actions/checkout@v2
65+
66+
- name: Setup PHP
67+
uses: shivammathur/setup-php@v2
68+
with:
69+
coverage: xdebug
70+
php-version: ${{ matrix.php }}
71+
72+
# TODO: build cache
73+
74+
- name: Install dependencies
75+
run: composer install --no-interaction --no-ansi --no-progress --no-suggest --prefer-dist --optimize-autoloader
76+
# todo: prefer-lowest
77+
78+
- name: PHPStan
79+
run: vendor/bin/phpstan analyse --no-progress .
80+
81+
# phpcs:
82+
# runs-on: ubuntu-latest
83+
# strategy:
84+
# matrix:
85+
# composer:
86+
# # - low
87+
# - high
88+
# php:
89+
# - 7.2
90+
# - 7.3
91+
# - 7.4
92+
# # - 8.0
93+
94+
# steps:
95+
# - name: Check out code
96+
# uses: actions/checkout@v2
97+
98+
# - name: Setup PHP
99+
# uses: shivammathur/setup-php@v2
100+
# with:
101+
# coverage: xdebug
102+
# php-version: ${{ matrix.php }}
103+
104+
# # TODO: build cache
105+
106+
# - name: Install dependencies
107+
# run: composer install --no-interaction --no-ansi --no-progress --no-suggest --prefer-dist --optimize-autoloader
108+
# # todo: prefer-lowest
109+
110+
# - name: PHPCS
111+
# run: vendor/bin/phpcs src tests
112+

.travis.yml

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

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22
All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
5+
6+
## [Unreleased]
7+
### Summary
8+
This release focuses on supporting newer versions of PHP and minimizing external dependencies.
9+
10+
### Added
11+
- Test suite: PHP 7.4
12+
13+
### Changed (Internal)
14+
- Migrated from Travis to Github Actions
15+
- Migrated from Coveralls to Codecov
16+
17+
### Removed
18+
- Test suite: PHP 7.1
19+
520
## [2.1.5] - 2019-02-04
621
### Summary
722
- More tests changes to improve compatibility with PHPUnit 8

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ Input
22
=====
33
An input validation framework with a boring name
44

5-
[![Build Status](https://travis-ci.org/Firehed/input.svg?branch=master)](https://travis-ci.org/Firehed/input)
6-
[![Coverage Status](https://coveralls.io/repos/github/Firehed/input/badge.svg?branch=master)](https://coveralls.io/github/Firehed/input?branch=master)
5+
[![Build Status](https://github.com/Firehed/input/workflows/tests/badge.svg)](https://github.com/Firehed/input/actions)
6+
[![Coverage Status](https://codecov.io/gh/Firehed/input/branch/master/graph/badge.svg)](https://codecov.io/gh/Firehed/input)
7+
78
[Changelog](CHANGELOG.md)
89

910
Concept

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"php": ">=7.0"
2121
},
2222
"require-dev": {
23-
"php-coveralls/php-coveralls": "^2.0",
2423
"phpstan/phpstan": "^0.11",
2524
"phpstan/phpstan-phpunit": "^0.11",
2625
"phpunit/phpunit": "^7"

0 commit comments

Comments
 (0)