Skip to content

Commit 80561ef

Browse files
committed
minor #6 migrate to github actions (azjezz)
This PR was merged into the 0.1-dev branch. Discussion ---------- migrate to github actions unit tests passsing: https://github.com/azjezz/oauth2-server-bundle/runs/2067307176?check_suite_focus=true code coverage failing ( fixing results in test failure, will fix in another patch) Commits ------- 346fdd6 migrate to github actions
2 parents 82d1a98 + 346fdd6 commit 80561ef

File tree

5 files changed

+98
-28
lines changed

5 files changed

+98
-28
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "coding standards"
2+
3+
on: ["pull_request", "push"]
4+
5+
jobs:
6+
coding-standards:
7+
name: "coding standards"
8+
runs-on: "ubuntu-latest"
9+
steps:
10+
- name: "checkout"
11+
uses: "actions/checkout@v2"
12+
13+
- name: "installing PHP"
14+
uses: "shivammathur/setup-php@v2"
15+
with:
16+
php-version: "7.4"
17+
ini-values: memory_limit=-1
18+
tools: composer:v2, cs2pr, php-cs-fixer
19+
20+
- name: "checking coding standards"
21+
run: "php-cs-fixer fix --dry-run --diff --ansi"

.github/workflows/unit-tests.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: "unit tests"
2+
3+
on: [ "pull_request", "push" ]
4+
5+
jobs:
6+
unit-tests:
7+
name: "unit tests"
8+
9+
runs-on: "ubuntu-latest"
10+
11+
strategy:
12+
matrix:
13+
symfony-version:
14+
- "4.4.*"
15+
- "5.2.*"
16+
php-version:
17+
- "7.2"
18+
- "7.3"
19+
- "7.4"
20+
- "8.0"
21+
dependencies:
22+
- "lowest"
23+
- "highest"
24+
include:
25+
- { symfony-version: "4.4.*", php-version: "7.1", dependencies: "lowest" }
26+
- { symfony-version: "4.4.*", php-version: "7.1", dependencies: "highest" }
27+
28+
steps:
29+
- name: "checkout"
30+
uses: "actions/checkout@v2"
31+
32+
- name: "installing PHP"
33+
uses: "shivammathur/setup-php@v2"
34+
with:
35+
php-version: "${{ matrix.php-version }}"
36+
tools: composer:v2, cs2pr
37+
extensions: intl, bcmath, curl, openssl, mbstring, pdo, pdo_sqlite
38+
coverage: pcov
39+
ini-values: memory_limit=-1
40+
41+
- name: "caching dependencies"
42+
uses: "actions/cache@v2"
43+
with:
44+
path: |
45+
~/.composer/cache
46+
vendor
47+
key: "php-${{ matrix.php-version }}"
48+
restore-keys: "php-${{ matrix.php-version }}"
49+
50+
- name: "configuring composer platform"
51+
if: (startsWith(matrix.php, '8.0'))
52+
run: composer config platform.php 7.4.99
53+
54+
- name: "install lowest dependencies"
55+
if: ${{ matrix.dependencies == 'lowest' }}
56+
run: |
57+
composer require --no-update symfony/config=${{ matrix.symfony-version }} symfony/http-kernel=${{ matrix.symfony-version }} symfony/dependency-injection=${{ matrix.symfony-version }} symfony/options-resolver=${{ matrix.symfony-version }}
58+
composer require --no-update --dev symfony/framework-bundle=${{ matrix.symfony-version }} symfony/yaml=${{ matrix.symfony-version }}
59+
composer update --prefer-lowest --no-interaction --no-progress --prefer-dist
60+
61+
- name: "install highest dependencies"
62+
if: ${{ matrix.dependencies == 'highest' }}
63+
run: |
64+
composer require --no-update symfony/config=${{ matrix.symfony-version }} symfony/http-kernel=${{ matrix.symfony-version }} symfony/dependency-injection=${{ matrix.symfony-version }} symfony/options-resolver=${{ matrix.symfony-version }}
65+
composer require --no-update --dev symfony/framework-bundle=${{ matrix.symfony-version }} symfony/yaml=${{ matrix.symfony-version }}
66+
composer update --no-interaction --no-progress --prefer-dist
67+
68+
- name: "installing phpunit"
69+
run: vendor/bin/simple-phpunit install
70+
71+
- name: "running unit tests"
72+
run: vendor/bin/simple-phpunit

.travis.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# OAuth2 Server Bundle
22

3-
[![Build Status](https://travis-ci.com/thephpleague/oauth2-server-bundle.svg?branch=master)](https://travis-ci.org/thephpleague/oauth2-server-bundle)
3+
![Unit tests status](https://github.com/thephpleague/oauth2-server-bundle/workflows/unit%20tests/badge.svg)
4+
![Coding standards status](https://github.com/thephpleague/oauth2-server-bundle/workflows/coding%20standards/badge.svg)
45
[![Latest Stable Version](https://poser.pugx.org/league/oauth2-server-bundle/v/stable)](https://packagist.org/packages/thephpleague/oauth2-server-bundle)
56

67
OAuth2ServerBundle is a Symfony bundle integrating the [oauth2-server](https://github.com/thephpleague/oauth2-server) library into Symfony applications.

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@
2727
"symfony/security-bundle": "^4.4|^5.0"
2828
},
2929
"require-dev": {
30+
"ext-pdo": "*",
31+
"ext-pdo_sqlite": "*",
3032
"laminas/laminas-diactoros": "^2.2",
3133
"nyholm/psr7": "^1.2",
3234
"symfony/browser-kit": "^4.4|^5.0",
33-
"symfony/phpunit-bridge": "^5.0"
35+
"symfony/phpunit-bridge": "^5.2"
3436
},
3537
"autoload": {
3638
"psr-4": { "League\\Bundle\\OAuth2ServerBundle\\": "src/" }

0 commit comments

Comments
 (0)