Skip to content

Commit

Permalink
Create php.yml (#71)
Browse files Browse the repository at this point in the history
* Create php.yml

Para que compruebe automáticamente si hay algún error con las dependencias del vendor.

* Update composer.json
  • Loading branch information
spariva committed Jun 8, 2024
1 parent 7e7df3a commit 52c473a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
39 changes: 39 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: PHP Composer

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

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4

- 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 --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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"jwilsson/spotify-web-api-php": "^6.0",
"league/oauth2-client": "^2.7"
},
"license": "GPL-3.0"
"license": "GPL-3.0-or-later"
}

0 comments on commit 52c473a

Please sign in to comment.