Skip to content

Commit

Permalink
Merge pull request #56 from relayphp/switch-from-travis-ci-to-github-…
Browse files Browse the repository at this point in the history
…actions

Switch from Travis CI to GitHub Actions
  • Loading branch information
kevinsmith authored May 23, 2021
2 parents 7606d88 + 18d592d commit fa79fcd
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 32 deletions.
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/.gitattributes export-ignore
/.gitignore export-ignore
/.scrutinizer.yml export-ignore
/.travis.yml export-ignore
/docs export-ignore
/phpunit.xml.dist export-ignore
/tests export-ignore
62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CI

on: [push, pull_request]

jobs:

coding-standards:
name: Coding Standards
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
- name: Install Composer Dependencies
uses: ramsey/composer-install@v1
- name: Run PHP-CS-Fixer
run: php vendor/bin/php-cs-fixer fix --verbose --dry-run --using-cache=no
- name: Run PHP_CodeSniffer
run: php vendor/bin/phpcs --no-cache --no-colors

static-analysis:
name: Static Analysis
strategy:
matrix:
os: [ ubuntu-18.04 ]
php: [ '7.1', '7.2', '7.3', '7.4', '8.0' ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Install Composer Dependencies
uses: ramsey/composer-install@v1
- name: Run PHPStan
run: php vendor/bin/phpstan analyse --no-interaction
- name: Run Psalm
run: php vendor/bin/psalm --shepherd

unit-tests:
name: Unit Tests
strategy:
matrix:
os: [ ubuntu-18.04 ]
php: [ '7.1', '7.2', '7.3', '7.4', '8.0' ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Install Composer Dependencies
uses: ramsey/composer-install@v1
- name: Run unit tests
run: php vendor/bin/phpunit
10 changes: 0 additions & 10 deletions .scrutinizer.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

0 comments on commit fa79fcd

Please sign in to comment.