Skip to content

Commit

Permalink
Migrate from Travis CI to GitHub actions
Browse files Browse the repository at this point in the history
Since Travis CI is no longer free for OS projects and GH Actions is a good replacement
Also restrict PHP version to 7.3+ as the current setup won't work with older versions anyway.
  • Loading branch information
mdio committed Jun 13, 2022
1 parent 9519299 commit 8280b59
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 15 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
tests:
strategy:
matrix:
php-versions: ['7.3', '7.4']

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
uses: php-actions/composer@v6
with:
version: 2
php_version: ${{ matrix.php-versions }}

- name: Run test suite
run: vendor/bin/phpunit
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
phpnsc
======

[![Build Status](https://travis-ci.com/researchgate/phpnsc.svg?branch=master)](https://travis-ci.com/researchgate/phpnsc)
![Test status](https://github.com/researchgate/phpnsc/actions/workflows/tests.yml/badge.svg)
[![Latest Stable Version](https://poser.pugx.org/rg/phpnsc/v/stable)](https://packagist.org/packages/rg/phpnsc)
[![Total Downloads](https://poser.pugx.org/rg/phpnsc/downloads)](https://packagist.org/packages/rg/phpnsc)
[![License](https://poser.pugx.org/rg/phpnsc/license)](https://packagist.org/packages/rg/phpnsc)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
],
"require": {
"php": "^7.1",
"php": "^7.3",
"symfony/console" : "^2.1|^3.0|^4.0|^5.0",
"phpunit/php-timer": "^4.0|^5.0"
},
Expand Down

0 comments on commit 8280b59

Please sign in to comment.