Skip to content

Commit

Permalink
Merge pull request #109 from botman/fixes-tests
Browse files Browse the repository at this point in the history
Fixes tests on travis-ci
  • Loading branch information
crynobone authored Sep 11, 2020
2 parents 3f08a5c + bf36b3f commit a456ac2
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 8 deletions.
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- BotMan Version: #.#.#
- PHP Version:
- Messaging Service(s):
- Cache Driver:

### Description:


### Steps To Reproduce:
40 changes: 40 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: 'Laravel Tests'

on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'

jobs:
tests-on-php71:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [7.4, 7.3, 7.2, 7.1]

name: PHP${{ matrix.php }}

steps:
- name: Checkout code
uses: actions/checkout@v1

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath
coverage: none

- name: Install dependencies
run: |
composer install --prefer-dist --no-interaction --no-suggest
- name: Execute tests
run: vendor/bin/phpunit
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.discovery/
.idea/
.DS_Store
composer.lock
.php_cs.cache
/vendor/
/vendor/
2 changes: 1 addition & 1 deletion .styleci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
preset: laravel

enabled:
- unalign_double_arrow
- unalign_double_arrow
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ php:
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4

before_script:
- travis_retry composer self-update --preview
- travis_retry composer install --prefer-dist --no-interaction
- travis_retry composer install --prefer-dist --no-interaction --ignore-platform-req=composer-plugin-api

script:
- vendor/bin/phpunit --coverage-clover=coverage.xml
Expand All @@ -17,4 +19,4 @@ before_install:
- echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini

after_success:
- codecov
- codecov
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
"botman/botman": "~2.1|~3.0"
},
"require-dev": {
"botman/studio-addons": "~1.0",
"phpunit/phpunit": "~5.0",
"illuminate/contracts": "~5.5.0",
"mockery/mockery": "dev-master",
"botman/studio-addons": "^1.0",
"phpunit/phpunit": "^5.0",
"illuminate/contracts": "^5.5",
"mockery/mockery": "^1.0",
"ext-curl": "*"
},
"autoload": {
Expand Down

0 comments on commit a456ac2

Please sign in to comment.