Skip to content

Commit

Permalink
CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Mar 20, 2024
1 parent bacb7a9 commit bfb57d2
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
POSTGRES_PASSWORD: postgres

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

- name: Setup Service
if: matrix.db-type == 'mysql'
Expand All @@ -47,23 +47,23 @@ jobs:
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

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

- name: Composer install --no-progress --prefer-dist --optimize-autoloader
- name: Composer install
run: |
composer --version
composer require --dev phpunit/phpunit:"^8.5"
if ${{ matrix.prefer-lowest == 'prefer-lowest' }}
then
composer update --prefer-lowest --prefer-stable
else
composer install --no-progress --prefer-dist --optimize-autoloader
fi
if ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then composer require --dev dereuromark/composer-prefer-lowest:dev-master; fi
- name: Run PHPUnit
run: |
if [[ ${{ matrix.db-type }} == 'sqlite' ]]; then export DB_URL='sqlite:///:memory:'; fi
Expand All @@ -74,6 +74,7 @@ jobs:
else
vendor/bin/phpunit
fi
- name: Validate prefer-lowest
run: if ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then vendor/bin/validate-prefer-lowest -m; fi

Expand All @@ -86,7 +87,7 @@ jobs:
runs-on: ubuntu-22.04

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -100,7 +101,7 @@ jobs:
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
Expand Down

0 comments on commit bfb57d2

Please sign in to comment.