Skip to content

Commit

Permalink
Use Github Actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
slashrsm committed Jul 21, 2022
1 parent d45763e commit 7d7b6ca
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 28 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Checks

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
strategy:
matrix:
php-versions: [ '7.4', '8.0', '8.1' ]
include:
- php-versions: '7.4'
coverage: pcov
composer-prefer: '--prefer-lowest --prefer-stable'
phpunit-flags: '--coverage-clover coverage.xml'

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: ${{ matrix.coverage }}

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

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-composer-${{ matrix.composer-prefer }}$-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-${{ matrix.composer-prefer }}-
- name: Install dependencies
run: composer update --prefer-dist --no-progress --ignore-platform-req="ext-*" ${{ matrix.composer-prefer }}

- name: Run phpspec
run: vendor/bin/phpspec run --config phpspec.yml.ci
continue-on-error: true

- name: Upload coverage
if: matrix.coverage
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.clover --revision=${{ github.event.pull_request.head.sha || github.sha }}
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

0 comments on commit 7d7b6ca

Please sign in to comment.