Skip to content

Commit

Permalink
Migrate to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Mar 14, 2021
1 parent 94655c7 commit 83018e8
Show file tree
Hide file tree
Showing 5 changed files with 491 additions and 1,490 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI
on:
push:
pull_request:
jobs:
supported-versions-matrix:
name: Supported Versions Matrix
runs-on: ubuntu-latest
outputs:
version: ${{ steps.supported-versions-matrix.outputs.version }}
steps:
- uses: actions/checkout@v1
- id: supported-versions-matrix
uses: WyriHaximus/github-action-composer-php-versions-in-range@v1
test:
name: Run Tests and Code Quality on PHP ${{ matrix.php }}
runs-on: ubuntu-latest
needs:
- supported-versions-matrix
strategy:
fail-fast: false
matrix:
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP, extensions and composer with shivammathur/setup-php
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug, pcov
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Get composer action hash
id: composer-action-hash
run: printf "::set-output name=hash::%s" $(echo -n "${{ matrix.composer }}" | sha512sum)
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-${{ steps.composer-action-hash.outputs.hash }}
- name: Install Composer dependencies
run: |
composer config --unset platform.php
composer update --lock
composer install --no-progress --no-interaction --no-suggest --optimize-autoloader --ansi
- name: Test
run: |
./vendor/bin/phpunit --coverage-text
php benchmark/memory.php
133 changes: 0 additions & 133 deletions .travis.yml

This file was deleted.

61 changes: 0 additions & 61 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"config": {
"sort-packages": true,
"platform": {
"php": "5.4"
"php": "5.4.33"
}
}
}
Loading

0 comments on commit 83018e8

Please sign in to comment.