Skip to content

Commit cc717d4

Browse files
authored
Create php.yml (#29)
1 parent 057e9d7 commit cc717d4

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed

.github/workflows/php.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: PHP Composer
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- run: pwd
19+
- uses: actions/checkout@v3
20+
21+
- name: Validate composer.json and composer.lock
22+
run: composer validate --strict
23+
24+
- name: Cache Composer packages
25+
id: composer-cache
26+
uses: actions/cache@v3
27+
with:
28+
path: vendor
29+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
30+
restore-keys: |
31+
${{ runner.os }}-php-
32+
33+
- name: Install dependencies
34+
run: composer install --no-dev --prefer-dist --no-progress
35+
36+
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
37+
# Docs: https://getcomposer.org/doc/articles/scripts.md
38+
39+
# - name: Run test suite
40+
# run: composer run-script test
41+
- uses: actions/upload-artifact@v3
42+
with:
43+
name: AuthManagerOAuth
44+
retention-days: 3
45+
path: /home/runner/work/AuthManagerOAuth/

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"name": "mohe2015/authmanageroauth",
3+
"description": "Create accounts or login using OAuth",
4+
"license": "GPL-2.0-or-later",
35
"config": {
46
"autoloader-suffix": "authmanageroauth"
57
},
@@ -23,6 +25,6 @@
2325
},
2426
"require": {
2527
"league/oauth2-client": "^2.6",
26-
"psr/container": "1.0.0"
28+
"psr/container": "^1.0.0"
2729
}
2830
}

0 commit comments

Comments
 (0)