Skip to content

Commit

Permalink
Migration to GitHub Actions (thephpleague#105)
Browse files Browse the repository at this point in the history
* Add github action

* bump php action version

* Remove nightly build because phpspec/prophecy

* Add nightly and rework matrix

* Reformat matrix

* Remove .travis.yml and fix nightly build
  • Loading branch information
sunkan authored Dec 11, 2020
1 parent 7dca015 commit adc58e9
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 26 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Tests

on: [push, pull_request]

jobs:

build:
name: Build
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
dependencies:
- "lowest"
- "highest"
php:
- '7.2'
- '7.3'
- '7.4'
- '8.0'
experimental:
- false
include:
- php: "8.1"
composer-options: "--ignore-platform-reqs"
experimental: true
dependencies: "highest"

steps:
- name: Set up PHP
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php }}
extensions: intl, mbstring
tools: "composer:v2"

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


- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: composer update --prefer-lowest --no-interaction --no-progress --no-suggest ${{ matrix.composer-options }}

- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: composer update --no-interaction --no-progress --no-suggest ${{ matrix.composer-options }}

- name: "Run tests"
run: ./vendor/bin/phpunit -c phpunit.xml

cs:
name: Codestyle check on PHP 7.2
runs-on: ubuntu-latest

steps:
- name: Set up PHP
uses: shivammathur/[email protected]
with:
php-version: 7.2

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

- name: Download dependencies
run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable

- name: Run tests
run: ./vendor/bin/phpcs
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

0 comments on commit adc58e9

Please sign in to comment.