Skip to content

Commit

Permalink
Merge pull request #16 from Nekland/feature/github-workflow
Browse files Browse the repository at this point in the history
feat(workflow): add github workflow
  • Loading branch information
Nek- authored Dec 17, 2020
2 parents 3ba44c3 + 6c6151a commit f5d7ac4
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 4 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Spec tests
on: [pull_request]
jobs:
run-tests:
name: PHP ${{ matrix.php }} (${{ matrix.os }})

runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
php: [ 7.3, 7.4, 8.0 ]
os: [ ubuntu-latest ]
phpunit-versions: ['latest']
include:
- os: [ ubuntu-latest ]
php: 8.1
composer-flag: "--ignore-platform-reqs"

- os: [ ubuntu-latest ]
php: 7.2
composer-flag: "--prefer-lowest"

steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}

- name: Install dependencies
run: composer update --prefer-dist ${{ matrix.composer-flag }}

- name: PHPUnit tests
run: ./vendor/bin/phpunit

- name: PHPSpec tests
run: ./vendor/bin/phpspec run
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
composer.lock
vendor
.phpunit.result.cache
15 changes: 11 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,18 @@
"php": "^7.0 || ^8.0"
},
"require-dev": {
"phpspec/phpspec": "^3.2",
"bossa/phpspec2-expect": "^2.3",
"phpunit/phpunit": "^5.7"
"phpspec/phpspec": "^6.3.0",
"bossa/phpspec2-expect": "dev-feature/php-8",
"phpunit/phpunit": "^8.5"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/Nek-/phpspec2-expect"
}
],
"_comment": [
"PHPSpec is limited to ^3.2 to keep compatibility with PHP5.6"
"PHPSpec is limited to ^6.x to keep compatibility with PHP7.1",
"The repository for expect package is temporary, see https://github.com/BossaConsulting/phpspec2-expect/pull/66"
]
}

0 comments on commit f5d7ac4

Please sign in to comment.