Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update workflow #7

Merged
merged 2 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
name: PHP Composer

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
on: [push, pull_request]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
php: [ 8.1, 8.2, 8.3 ]
dependency-version: [ prefer-stable ]

name: PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: ${{ matrix.php }}
extensions: xdebug
ini-values: xdebug.mode="coverage"
coverage: xdebug
Expand All @@ -34,14 +38,16 @@ jobs:
- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
- name: Get Composer cache directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Composer packages
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
path: ${{ steps.composer-cache.outputs.dir }}
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Install dependencies
run: composer install --prefer-dist --no-progress
Expand All @@ -54,6 +60,4 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests
name: alicia-codecov
fail_ci_if_error: true
1 change: 1 addition & 0 deletions src/Models/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
*/
class Resource extends Model
{
// TODO: model attributes is not documented
use FFMpegPreConfig;

/**
Expand Down
8 changes: 4 additions & 4 deletions src/Services/AliciaService.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function batch(array $files): self
*
* @param UploadedFile $file
*
* @throws AliciaException ()
* @throws AliciaException
*
* @return self
*/
Expand All @@ -67,7 +67,7 @@ public function upload(UploadedFile $file): self
*
* @param string $file
*
* @throws AliciaException ()
* @throws AliciaException
*
* @return self
*/
Expand All @@ -83,7 +83,7 @@ public function external(string $file): self
*
* @param array|null $resolutions
*
* @throws AliciaException|InvalidManipulation
* @throws InvalidManipulation
*
* @return AliciaService
*/
Expand All @@ -107,7 +107,7 @@ public function export(array $resolutions = null): self
}

/**
* Make a internal resource to external using given link.
* Make an internal resource to external using given link.
*
* @param resource $model
* @param string $url
Expand Down
Loading