Skip to content

Commit

Permalink
Create php.yml (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
mohe2015 authored May 6, 2022
1 parent 057e9d7 commit cc717d4
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
45 changes: 45 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: PHP Composer

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- run: pwd
- uses: actions/checkout@v3

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --no-dev --prefer-dist --no-progress

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

# - name: Run test suite
# run: composer run-script test
- uses: actions/upload-artifact@v3
with:
name: AuthManagerOAuth
retention-days: 3
path: /home/runner/work/AuthManagerOAuth/
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"name": "mohe2015/authmanageroauth",
"description": "Create accounts or login using OAuth",
"license": "GPL-2.0-or-later",
"config": {
"autoloader-suffix": "authmanageroauth"
},
Expand All @@ -23,6 +25,6 @@
},
"require": {
"league/oauth2-client": "^2.6",
"psr/container": "1.0.0"
"psr/container": "^1.0.0"
}
}

0 comments on commit cc717d4

Please sign in to comment.