Skip to content
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
32 changes: 32 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: GitHub Action
on:
push:

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ["5.6", "7.0", "7.1", "7.2", "7.4", "8.0" ]

steps:
- uses: actions/checkout@v2

- name: setup php
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: intl, iconv, mbstring

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run linter
run: composer lint

- name: Run tests
run: composer test
11 changes: 11 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,16 @@
"psr-0": {
"ForceUTF8\\": "src/"
}
},
"scripts" : {
"build": [
"@lint",
"@test"
],
"lint" : "@php vendor/bin/parallel-lint src",
"test" : "@php test/ForceUTF8Test.php"
},
"require-dev": {
"php-parallel-lint/php-parallel-lint": "^1.3"
}
}