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

Switch from Travis build to GitHub Actions #6

Merged
merged 1 commit into from
Jan 23, 2021
Merged
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
65 changes: 65 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: ci
on: [push]

jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['7.3', '7.4', '8.0']
composer-prefer-lowest: [false]
coveralls: [false]
include:
- operating-system: 'ubuntu-latest'
php-versions: '7.4'
composer-prefer-lowest: true
coveralls: false
- operating-system: 'ubuntu-latest'
php-versions: '7.4'
composer-prefer-lowest: false
coveralls: true
steps:
- name: Checkout repo
uses: actions/checkout@v2

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

- name: Install Composer dependencies
run: composer install

- name: Install lowest CaptainHookPHP version
if: matrix.composer-prefer-lowest == true
run: |
composer remove captainhook/captainhook captainhook/plugin-composer
composer require --prefer-lowest captainhook/captainhook captainhook/plugin-composer

- name: Linting code
run: ./vendor/bin/phing lint

- name: Codesniffer
run: ./vendor/bin/phing sniff

- name: Static code analysis
run: ./vendor/bin/phing analyse

- name: Unittests
if: matrix.coveralls == false
run: ./vendor/bin/phing unit

- name: Unittests with coverage
if: matrix.coveralls == true
run: ./vendor/bin/phing unit-with-coverage

- name: Coveralls report
if: matrix.coveralls == true
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer require php-coveralls/php-coveralls
./vendor/bin/php-coveralls --coverage_clover=clover.xml -v
47 changes: 0 additions & 47 deletions .travis.yml

This file was deleted.