Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ci): add github actions #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build

on:
push:
pull_request:

jobs:
run:
runs-on: ubuntu-latest

strategy:
matrix:
php-versions: ['7.2']
composer-stability: [ 'prefer-lowest', 'prefer-stable' ]

name: PHP ${{ matrix.php-versions }} - ${{ matrix.composer-stability }}

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

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

- name: Validate composer.json
run: composer validate

- name: Install dependencies
run: composer update --prefer-source --no-interaction --${{ matrix.composer-stability }}

- name: Run phpspec tests
run: ./bin/phpspec run --format=dot

- name: Run behat tests
run: ./bin/behat
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#PhpSpec data provider extension
# PhpSpec data provider extension

[![Build Status](https://travis-ci.org/coduo/phpspec-data-provider-extension.svg?branch=master)](https://travis-ci.org/coduo/phpspec-data-provider-extension)
[![GitHub Actions](https://github.com/madisoft/phpspec-data-provider-extension/workflows/Build/badge.svg)](https://github.com/madisoft/phpspec-data-provider-extension/actions)

This extension allows you to create data providers for examples in specs.

Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "moave/phpspec-data-provider-extension",
"description": "This extension allows you to create data providers for examples in specs.",
"type": "library",
"keywords": ["phpspec", "dataprovider", "extension", "coduo", "data", "provider"],
"license": "MIT",
Expand All @@ -14,8 +15,8 @@
}
],
"require": {
"php": "^7.0",
"phpspec/phpspec": "6.*"
"php": "^7.2",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this because phpspec v6 works only with php >= 7.2: https://packagist.org/packages/phpspec/phpspec#6.0.0

"phpspec/phpspec": "^6.0"
},
"require-dev": {
"behat/behat": "^3.1",
Expand Down