Skip to content

Commit

Permalink
Added GitHub workflow in lieu of Travis build.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilge committed Oct 5, 2022
1 parent 5422398 commit f36f088
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 35 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/Test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Test

on:
push:
workflow_dispatch:

jobs:
Test:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php:
- 8.1
- 8.2
dependencies:
- hi
- lo

steps:
- uses: actions/checkout@v2

- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug

- name: Validate composer.json
run: composer validate

- name: Cache dependencies
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: php-${{ matrix.php }}-${{ matrix.dependencies }}-${{ hashFiles('composer.json') }}
restore-keys: php-${{ matrix.php }}-${{ matrix.dependencies }}-

- name: Install dependencies ${{ matrix.dependencies == 'lo' && '(lowest)' || '' }}
run: composer update --no-interaction --no-progress
${{ matrix.dependencies == 'lo' && '--prefer-lowest' || '' }}

- name: Run test suite with coverage
run: composer test -- --coverage-clover=build/logs/clover.xml

- name: Upload test coverage
run: composer global require php-coveralls/php-coveralls && php-coveralls -v
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/vendor/
/.*/
!/.github
/composer.lock
/*.log
.phpunit.result.cache
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
"minimum-stability": "beta",
"require": {
"php": "^8.1",
"amphp/amp": "^3"
"amphp/amp": "^3-beta.9",
"revolt/event-loop": "^0.2"
},
"require-dev": {
"infection/infection": ">=0.13,<1",
"phpunit/phpunit": "^9",
"phpunit/phpunit": "^9.5.23",
"roave/security-advisories": "dev-latest"
},
"autoload": {
Expand Down

0 comments on commit f36f088

Please sign in to comment.