Skip to content

Commit

Permalink
Support console 4 (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriksm committed Jul 18, 2022
1 parent fb5ab28 commit 0c5c87a
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 16 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/test.yml
@@ -0,0 +1,60 @@
name: Test
on:
- push
- pull_request

jobs:
test:
name: Run tests
runs-on: 'ubuntu-20.04'
strategy:
fail-fast: false
matrix:
php-version:
- "7.0"
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
console-version:
- "^3.4"
- "^4"
steps:
- name: Dump matrix context
env:
MATRIX_CONTEXT: ${{ toJSON(matrix) }}
run: echo "$MATRIX_CONTEXT"

- name: Checkout
uses: actions/checkout@v2

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

- name: Dump composer verson
run: composer --version

- name: Validate composer.json
run: composer --verbose validate

- name: Install dependencies
run: composer --verbose install

- name: Test the actual console version here
if: ${{ (matrix.console-version != '^4' || matrix.php-version != '7.0') }}
run: |
composer require symfony/yaml:${{ matrix.console-version }} symfony/console:${{ matrix.console-version }} --with-all-dependencies
- name: Run tests
run: composer test

- name: Coveralls
if: matrix.php-version == 7.4
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
php vendor/bin/php-coveralls -v
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -2,4 +2,4 @@
Array output for Symfony Console

[![Coverage Status](https://coveralls.io/repos/github/eiriksm/symfony-console-array-output/badge.svg?branch=master)](https://coveralls.io/github/eiriksm/symfony-console-array-output?branch=master)
[![Build Status](https://travis-ci.org/eiriksm/symfony-console-array-output.svg?branch=master)](https://travis-ci.org/eiriksm/symfony-console-array-output)
[![Test](https://github.com/eiriksm/symfony-console-array-output/actions/workflows/test.yml/badge.svg)](https://github.com/eiriksm/symfony-console-array-output/actions/workflows/test.yml)
6 changes: 3 additions & 3 deletions composer.json
Expand Up @@ -2,9 +2,9 @@
"name": "eiriksm/symfony-console-array-output",
"description": "Array output for console commands",
"require-dev": {
"phpunit/phpunit": "^6.5",
"phpunit/phpunit": "^6.5||^7||^8||^9",
"squizlabs/php_codesniffer": "^3.2",
"satooshi/php-coveralls": "^2.0"
"php-coveralls/php-coveralls": "^2.0"
},
"scripts": {
"test": "phpunit"
Expand All @@ -15,6 +15,6 @@
}
},
"require": {
"symfony/console": "^3.4"
"symfony/console": "^3.4||^4"
}
}

0 comments on commit 0c5c87a

Please sign in to comment.