Skip to content

Commit

Permalink
Merge pull request #52 from DiegoPino/ISSUE-50
Browse files Browse the repository at this point in the history
ISSUE-50: Create Github Actions based ci.yml (#1)

Tests against lower and higher PHP versions we support (theory of feature inclussion, if it works in 7.1 and 7.4 means it works ini 7.2 and 7.3 because those either exclude 7.1 or include 7.4)
  • Loading branch information
DiegoPino committed Aug 13, 2021
2 parents 66bce8d + eec39b0 commit 9ca290b
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/issue_template.md
Expand Up @@ -4,4 +4,4 @@ Please replace this line with full information about your idea or problem. If it

---

Please preserve this line to notify @OriHoch (lead of this repository)
Please preserve this line to notify @DiegoPino (lead of this repository)
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Expand Up @@ -4,4 +4,4 @@ Please replace this line with full information about your pull request. Make sur

---

Please preserve this line to notify @OriHoch (lead of this repository)
Please preserve this line to notify @DiegoPino (lead of this repository)
58 changes: 58 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,58 @@
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.1', '7.4']

name: frictionlessdata/datapackage-php PHP ${{ matrix.php-versions }} test on ${{ matrix.operating-system }}

steps:
- uses: actions/checkout@v2

- name: Cache Composer dependencies
uses: actions/cache@v2
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}

- uses: php-actions/composer@v6
with:
php_version: ${{ matrix.php-versions }}
php_extensions: zip
version: 2

- name: Validate composer.json & composer.lock for PHP ${{ matrix.php-versions }}
uses: php-actions/composer@v6
with:
php_version: ${{ matrix.php-versions }}
php_extensions: zip
version: 2
command: validate --strict

- name: Run Code Style Check for PHP ${{ matrix.php-versions }}
uses: php-actions/composer@v6
with:
php_version: ${{ matrix.php-versions }}
php_extensions: zip
version: 2
dev: yes
command: style-check

- name: Run Tests for PHP ${{ matrix.php-versions }}
uses: php-actions/composer@v6
with:
php_version: ${{ matrix.php-versions }}
php_extensions: zip
dev: yes
command: test



6 changes: 0 additions & 6 deletions .install_cs_fixer.sh

This file was deleted.

14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
@@ -1,6 +1,6 @@
# Data Package

[![Travis](https://travis-ci.org/frictionlessdata/datapackage-php.svg?branch=master)](https://travis-ci.org/frictionlessdata/datapackage-php)
[![Build](https://github.com/frictionlessdata/datapackage-php/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/frictionlessdata/datapackage-php/actions/workflows/ci.yml)
[![Coveralls](http://img.shields.io/coveralls/frictionlessdata/datapackage-php.svg?branch=master)](https://coveralls.io/r/frictionlessdata/datapackage-php?branch=master)
[![Scrutinizer-ci](https://scrutinizer-ci.com/g/frictionlessdata/datapackage-php/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/frictionlessdata/datapackage-php/)
[![Packagist](https://img.shields.io/packagist/dm/frictionlessdata/datapackage.svg)](https://packagist.org/packages/frictionlessdata/datapackage)
Expand All @@ -18,7 +18,7 @@ A utility library for working with [Data Package](https://specs.frictionlessdata
composer require frictionlessdata/datapackage
```

Optionally, to create zip files you will need the PHP zip extension. On ubuntu it can be enabled with `sudo apt-get install php-zip`
Optionally, to create zip files you will need the PHP zip extension. On Ubuntu it can be enabled with `sudo apt-get install php-zip`

### Package

Expand Down

0 comments on commit 9ca290b

Please sign in to comment.