Skip to content

Commit 6091bd9

Browse files
committed
Move tests from Travis CI to GitHub
1 parent 5cec7b5 commit 6091bd9

File tree

3 files changed

+62
-27
lines changed

3 files changed

+62
-27
lines changed

.github/workflows/ci.yml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
tests:
11+
if: "!contains(github.event.head_commit.message, 'skip ci')"
12+
name: PHP ${{ matrix.php-versions }} on ${{ matrix.os }}
13+
runs-on: ${{ matrix.os }}
14+
continue-on-error: ${{ matrix.php-versions == '8.1' }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
php-versions: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
19+
os: [ubuntu-latest, windows-latest]
20+
21+
steps:
22+
- name: Configure git
23+
if: runner.os == 'Windows'
24+
run: git config --system core.autocrlf false; git config --system core.eol lf
25+
26+
- name: Checkout
27+
uses: actions/checkout@v2
28+
29+
- name: Set up PHP ${{ matrix.php-versions }}
30+
uses: shivammathur/setup-php@v2
31+
with:
32+
php-version: ${{ matrix.php-versions }}
33+
ini-values: date.timezone=Europe/Berlin
34+
35+
- name: Setup Problem Matchers for PHP
36+
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
37+
38+
- name: Validate composer.json and composer.lock
39+
run: composer validate
40+
41+
- name: Get Composer Cache Directory
42+
id: composer-cache
43+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
44+
45+
- name: Cache dependencies
46+
uses: actions/[email protected]
47+
with:
48+
path: ${{ steps.composer-cache.outputs.dir }}
49+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
50+
restore-keys: ${{ runner.os }}-composer-
51+
52+
- name: Install dependencies
53+
run: >
54+
curl -sSL https://dl.bintray.com/xp-runners/generic/xp-run-8.3.0.sh > xp-run &&
55+
composer install --prefer-dist &&
56+
echo "vendor/autoload.php" > composer.pth
57+
58+
- name: Run test suite
59+
run: sh xp-run xp.unittest.TestRunner src/test/php

.travis.yml

-25
This file was deleted.

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
HTTP protocol support for the XP Framework
22
========================================================================
33

4-
[![Build Status on TravisCI](https://secure.travis-ci.org/xp-framework/http.svg)](http://travis-ci.org/xp-framework/http)
4+
[![Build status on GitHub](https://github.com/xp-framework/http/workflows/Tests/badge.svg)](https://github.com/xp-framework/http/actions)
55
[![XP Framework Module](https://raw.githubusercontent.com/xp-framework/web/master/static/xp-framework-badge.png)](https://github.com/xp-framework/core)
66
[![BSD Licence](https://raw.githubusercontent.com/xp-framework/web/master/static/licence-bsd.png)](https://github.com/xp-framework/core/blob/master/LICENCE.md)
7-
[![Requires PHP 7.0+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-7_0plus.png)](http://php.net/)
7+
[![Requires PHP 7.0+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-7_0plus.svg)](http://php.net/)
8+
[![Supports PHP 8.0+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-8_0plus.svg)](http://php.net/)
89
[![Latest Stable Version](https://poser.pugx.org/xp-framework/http/version.png)](https://packagist.org/packages/xp-framework/http)
910

1011
Implements HTTP (HyperText Transfer Protocol) and provides a client to interact with HTTP servers. The `HttpConnection` is the entry point class.

0 commit comments

Comments
 (0)