-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# These owners will be the default owners for everything in the repo. Unless a | ||
# later match takes precedence, they will be requested for review when someone | ||
# opens a pull request. | ||
* @code4romania/php | ||
|
||
# More details on creating a codeowners file: | ||
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
version: 2 | ||
updates: | ||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
|
||
# Maintain dependencies for Composer | ||
- package-ecosystem: "composer" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
versioning-strategy: increase | ||
# This option has no impact on security updates, which have a separate, | ||
# internal limit of ten open pull requests. | ||
open-pull-requests-limit: 0 | ||
|
||
# Maintain dependencies for npm | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
versioning-strategy: increase | ||
# This option has no impact on security updates, which have a separate, | ||
# internal limit of ten open pull requests. | ||
open-pull-requests-limit: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Tests | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
name: PHP ${{ matrix.php-version }} | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-version: | ||
- "8.3" | ||
|
||
env: | ||
extensions: mbstring, sqlite, intl, gd | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup cache environment | ||
id: extcache | ||
uses: shivammathur/cache-extensions@v1 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: ${{ env.extensions }} | ||
key: php-extensions-cache | ||
|
||
- name: Cache extensions | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.extcache.outputs.dir }} | ||
key: ${{ steps.extcache.outputs.key }} | ||
restore-keys: ${{ steps.extcache.outputs.key }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: ${{ env.extensions }} | ||
coverage: pcov | ||
tools: composer:v2 | ||
|
||
- name: Get composer cache directory | ||
id: composercache | ||
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | ||
|
||
- name: Cache composer dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.composercache.outputs.dir }} | ||
key: dependencies-composer-${{ hashFiles('composer.lock') }}-php-${{ matrix.php-version }} | ||
restore-keys: dependencies-composer- | ||
|
||
- name: Install composer dependencies | ||
run: composer install --prefer-dist --no-interaction | ||
|
||
- name: Setup env | ||
run: | | ||
cp .env.example .env | ||
php artisan key:generate --ansi | ||
- name: Run tests | ||
run: php artisan test |