Skip to content

Commit

Permalink
Uncomment composer validate, use ramsey/composer-install@v2 which han…
Browse files Browse the repository at this point in the history
…dles caching
  • Loading branch information
defunctl committed Feb 20, 2024
1 parent 271d6d6 commit 8bc1a5c
Showing 1 changed file with 4 additions and 35 deletions.
39 changes: 4 additions & 35 deletions .github/workflows/test-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,42 +33,11 @@ jobs:
- name: Install composer
run: sudo composer self-update --stable

# Composer validate doesn't like our type of "wordpress-plugin"
# - name: Validate composer.json and composer.lock
# run: composer validate
- name: Validate composer.json and composer.lock
run: composer validate

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: |
vendor
vendor-prod
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
- name: Install composer dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
env:
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.COMPOSER_TOKEN }}"}}'
run: |
composer config store-auths false
composer install --no-progress --no-suggest --ignore-platform-reqs
- name: Install composer vendor-prod
if: steps.composer-cache.outputs.cache-hit != 'true'
env:
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.COMPOSER_TOKEN }}"}}'
COMPOSER_VENDOR_DIR: vendor-prod
run: |
composer config store-auths false
composer install --prefer-dist --no-dev --no-ansi --no-interaction
composer du -a --no-dev --no-ansi --no-interaction
- name: Generate autoloader
if: steps.composer-cache.outputs.cache-hit == 'true'
run: composer du
- name: Install Composer dependencies
uses: ramsey/composer-install@v2

- name: Setup environment
run: envsubst < tests/docker-compose.codeception.env > tests/codeception.env
Expand Down

0 comments on commit 8bc1a5c

Please sign in to comment.