Skip to content

Commit

Permalink
Update CI config
Browse files Browse the repository at this point in the history
  • Loading branch information
qdequippe authored Mar 2, 2024
1 parent eadeccc commit b202bc5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 30 deletions.
8 changes: 4 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ version: 2

updates:
# Maintain dependencies for GitHub Actions
#- package-ecosystem: "github-actions"
# directory: "/"
# schedule:
# interval: "monthly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"

# Maintain dependencies for Composer
- package-ecosystem: "composer"
Expand Down
41 changes: 15 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
lint:
Expand All @@ -17,46 +16,36 @@ jobs:
with:
php-version: '7.3'

- name: 'Get composer cache directory'
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: 'Cache dependencies'
uses: actions/cache@v2
- uses: "ramsey/composer-install@v3"
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer update --prefer-dist
composer-options: "--prefer-dist"

- name: Code Sniffer
run: vendor/bin/phpcs --standard=psr2 src/

test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"

steps:
- uses: actions/checkout@v2

- name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'

- name: 'Get composer cache directory'
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
php-version: "${{ matrix.php-version }}"

- name: 'Cache dependencies'
uses: actions/cache@v2
- uses: "ramsey/composer-install@v3"
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer update --prefer-dist
composer-options: "--prefer-dist"

- name: Run tests
run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover

0 comments on commit b202bc5

Please sign in to comment.