Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
206 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,202 @@ | ||
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions | ||
|
||
name: "Build" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "master" | ||
|
||
jobs: | ||
lint: | ||
name: "Lint" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.1" | ||
- "7.2" | ||
- "7.3" | ||
- "7.4" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2.0.0" | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@1.8.2" | ||
with: | ||
coverage: "none" | ||
php-version: "${{ matrix.php-version }}" | ||
|
||
- name: "Cache dependencies" | ||
uses: "actions/cache@v1.1.2" | ||
with: | ||
path: "~/.composer/cache" | ||
key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}" | ||
restore-keys: "php-${{ matrix.php-version }}-composer-" | ||
|
||
- name: "Install dependencies" | ||
run: "composer update --prefer-dist --no-interaction --no-progress --no-suggest" | ||
|
||
- name: "Lint" | ||
run: "bin/phing lint" | ||
|
||
coding-standards: | ||
name: "Coding standards" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.4" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2.0.0" | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@1.8.2" | ||
with: | ||
coverage: "none" | ||
php-version: "${{ matrix.php-version }}" | ||
|
||
- name: "Cache dependencies" | ||
uses: "actions/cache@v1.1.2" | ||
with: | ||
path: "~/.composer/cache" | ||
key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}" | ||
restore-keys: "php-${{ matrix.php-version }}-composer-" | ||
|
||
- name: "Install dependencies" | ||
run: "composer update --prefer-dist --no-interaction --no-progress --no-suggest" | ||
|
||
- name: "Lint" | ||
run: "bin/phing lint" | ||
|
||
- name: "Coding Standard" | ||
run: "bin/phing cs" | ||
|
||
static-analysis: | ||
name: "Static analysis" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.4" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2.0.0" | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@1.8.2" | ||
with: | ||
coverage: "none" | ||
php-version: "${{ matrix.php-version }}" | ||
|
||
- name: "Cache dependencies" | ||
uses: "actions/cache@v1.1.2" | ||
with: | ||
path: "~/.composer/cache" | ||
key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}" | ||
restore-keys: "php-${{ matrix.php-version }}-composer-" | ||
|
||
- name: "Install dependencies" | ||
run: "composer update --prefer-dist --no-interaction --no-progress --no-suggest" | ||
|
||
- name: "PHPStan" | ||
run: "bin/phing phpstan" | ||
|
||
tests: | ||
name: "Tests" | ||
|
||
runs-on: ${{ matrix.operating-system }} | ||
|
||
strategy: | ||
matrix: | ||
dependencies: ["lowest", "highest"] | ||
php-version: | ||
- "7.1" | ||
- "7.2" | ||
- "7.3" | ||
- "7.4" | ||
operating-system: ["ubuntu-latest", "windows-latest"] | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2.0.0" | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@1.8.2" | ||
with: | ||
coverage: "none" | ||
php-version: "${{ matrix.php-version }}" | ||
extensions: mbstring | ||
|
||
- name: "Cache dependencies" | ||
uses: "actions/cache@v1.1.2" | ||
with: | ||
path: "~/.composer/cache" | ||
key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}" | ||
restore-keys: "php-${{ matrix.php-version }}-composer-" | ||
|
||
- name: "Install lowest dependencies" | ||
if: ${{ matrix.dependencies == 'lowest' }} | ||
run: "composer update --prefer-lowest --prefer-dist --no-interaction --no-progress --no-suggest" | ||
|
||
- name: "Install highest dependencies" | ||
if: ${{ matrix.dependencies == 'highest' }} | ||
run: "composer update --prefer-dist --no-interaction --no-progress --no-suggest" | ||
|
||
- name: "Tests" | ||
run: "bin/phing tests-without-code-coverage" | ||
|
||
code-coverage: | ||
name: "Code coverage" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS }} | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.4" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2.0.0" | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@1.8.2" | ||
with: | ||
coverage: "pcov" | ||
php-version: "${{ matrix.php-version }}" | ||
tools: pecl | ||
|
||
- name: "Cache dependencies" | ||
uses: "actions/cache@v1.1.2" | ||
with: | ||
path: "~/.composer/cache" | ||
key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}-with-coveralls" | ||
restore-keys: "php-${{ matrix.php-version }}-composer-" | ||
|
||
- name: "Install dependencies" | ||
run: "composer update --prefer-dist --no-interaction --no-progress --no-suggest" | ||
|
||
- name: "Install PHP Coveralls" | ||
run: "composer require php-coveralls/php-coveralls:2.2.0" | ||
|
||
- name: "Tests" | ||
run: bin/phing tests | ||
|
||
- name: "Upload to Coveralls" | ||
run: bin/php-coveralls --verbose --config build/coveralls.yml |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.