Skip to content

Commit

Permalink
Replace Travis CI with GitHub Actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
TravisCarden committed Jun 11, 2021
1 parent c3b0e07 commit 9a45d6b
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 32 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 1,54 @@
---
name: Tests

on:
push:
branches: [ master, wip ]
pull_request:
branches: [ master ]
schedule:
# Every Monday at 00:00:00 UTC.
# @see https://crontab.cronhub.io/
- cron: "0 0 * * 1"

jobs:
build:
name: "PHP ${{ matrix.php }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ["7.3", "7.4", "8.0"]
steps:
- name: "Set up PHP"
uses: shivammathur/setup-php@v2 # https://github.com/marketplace/actions/setup-php-action
with:
php-version: "${{ matrix.php }}"

- name: "Checkout code"
uses: actions/checkout@v2 # https://github.com/marketplace/actions/checkout

- name: "Install dependencies"
uses: ramsey/composer-install@v1 # https://github.com/marketplace/actions/install-composer-dependencies
with:
composer-options: "--no-cache"

- name: "Validate composer.json"
run: "composer validate"

- name: "Run PHPCS"
run: vendor/bin/phpcs

- name: "Run PHPUnit"
run: vendor/bin/phpunit

- name: "Run Behat"
run: "vendor/bin/behat -fprogress --strict"

- name: "Send coverage data to Coveralls.io"
if: "matrix.php == '7.4'" # Limit coverage data to one PHP version.
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
~/.composer/vendor/bin/php-coveralls -v
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 17,6 @@
},
"require-dev": {
"behat/behat": "^3.3",
"php-coveralls/php-coveralls": "^2.1",
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.6"
},
Expand Down

0 comments on commit 9a45d6b

Please sign in to comment.