Skip to content

Commit

Permalink
Update GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
alphp committed Jul 21, 2024
1 parent ff4e378 commit c5f12e3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ end_of_line = crlf
indent_style = space
indent_size = 4

[*.md]
[*.{md,yml}]
indent_style = space
indent_size = 2
17 changes: 12 additions & 5 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,38 @@ on: [push, pull_request]
permissions:
contents: read

env:
COMPOSER_ROOT_VERSION: dev-main

jobs:
build:

runs-on: ubuntu-latest

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

- name: Validate composer.json and composer.lock
run: composer validate --strict
uses: php-actions/composer@v6
with:
command: validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
uses: actions/cache@v4
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
uses: php-actions/composer@v6
with:
args: --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: php-actions/phpunit@v4
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Thumbs.db
/vendor
/tmp
.phpunit.cache
.phpunit.*.cache
.workflows
/.vscode
/composer.lock
Expand Down
1 change: 0 additions & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<phpunit
bootstrap="vendor/autoload.php"
colors="true"
cacheResultFile=".phpunit.cache"
displayDetailsOnTestsThatTriggerDeprecations="true"
displayDetailsOnTestsThatTriggerErrors="true"
displayDetailsOnTestsThatTriggerNotices="true"
Expand Down

0 comments on commit c5f12e3

Please sign in to comment.