Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ramsey/composer-install action #10966

Open
wants to merge 11 commits into
base: 5.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 5 additions & 22 deletions .github/workflows/bcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,13 @@ jobs:
with:
fetch-depth: 0

- name: Get Composer Cache Directories
id: composer-cache
run: |
echo "files_cache=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
echo "vcs_cache=$(composer config cache-vcs-dir)" >> $GITHUB_OUTPUT

- name: Generate composer.lock
run: |
composer update --no-install

- name: Cache composer cache
uses: actions/cache@v4
- name: Install Dependencies
uses: ramsey/composer-install@v3
with:
path: |
${{ steps.composer-cache.outputs.files_cache }}
${{ steps.composer-cache.outputs.vcs_cache }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
composer-options: "--optimize-autoloader"

- name: Run composer install
run: |
composer install -o
composer bin bcc install
- name: Run bin install
run: composer bin bcc install
env:
COMPOSER_ROOT_VERSION: dev-master

Expand Down
27 changes: 3 additions & 24 deletions .github/workflows/build-phar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,31 +48,10 @@ jobs:
with:
fetch-depth: 0 # required for composer to automatically detect root package version

- name: Get Composer Cache Directories
id: composer-cache
run: |
echo "files_cache=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
echo "vcs_cache=$(composer config cache-vcs-dir)" >> $GITHUB_OUTPUT

- name: Generate composer.lock
run: |
composer update --no-install

- name: Cache composer cache
uses: actions/cache@v4
- name: Install Dependencies
uses: ramsey/composer-install@v3
with:
path: |
${{ steps.composer-cache.outputs.files_cache }}
${{ steps.composer-cache.outputs.vcs_cache }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Run composer install
run: composer install -o
# DO NOT set this, we need composer to figure out the version itself
# env:
# COMPOSER_ROOT_VERSION: dev-master
composer-options: "--optimize-autoloader"

- run: bin/build-phar.sh
env:
Expand Down
79 changes: 9 additions & 70 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,13 @@ jobs:

- uses: actions/checkout@v4

- name: Get Composer Cache Directories
id: composer-cache
run: |
echo "files_cache=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
echo "vcs_cache=$(composer config cache-vcs-dir)" >> $GITHUB_OUTPUT

- name: Generate composer.lock
run: |
composer update --no-install
env:
COMPOSER_ROOT_VERSION: dev-master

- name: Cache composer cache
uses: actions/cache@v4
with:
path: |
${{ steps.composer-cache.outputs.files_cache }}
${{ steps.composer-cache.outputs.vcs_cache }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Run composer install
run: composer install -o
- name: Install Dependencies
uses: ramsey/composer-install@v3
env:
COMPOSER_ROOT_VERSION: dev-master

- run: |
git ls-files | grep \\\.php$ | grep -v ^dictionaries/scripts/* | ./vendor/bin/parallel-lint --stdin
git ls-files -- '*.php' ':!:dictionaries/scripts/*' | ./vendor/bin/parallel-lint --stdin
Comment on lines -51 to +29
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an extra from the man page of git.


code-style:
name: Code Style Analysis
Expand All @@ -65,29 +43,10 @@ jobs:

- uses: actions/checkout@v4

- name: Get Composer Cache Directories
id: composer-cache
run: |
echo "files_cache=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
echo "vcs_cache=$(composer config cache-vcs-dir)" >> $GITHUB_OUTPUT

- name: Generate composer.lock
run: composer update --no-install
env:
COMPOSER_ROOT_VERSION: dev-master

- name: Cache composer cache
uses: actions/cache@v4
- name: Install Dependencies
uses: ramsey/composer-install@v3
with:
path: |
${{ steps.composer-cache.outputs.files_cache }}
${{ steps.composer-cache.outputs.vcs_cache }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Run composer install
run: composer install -o
composer-options: "--optimize-autoloader"
env:
COMPOSER_ROOT_VERSION: dev-master

Expand Down Expand Up @@ -152,30 +111,10 @@ jobs:

- uses: actions/checkout@v4

- name: Get Composer Cache Directories
id: composer-cache
run: |
echo "files_cache=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
echo "vcs_cache=$(composer config cache-vcs-dir)" >> $GITHUB_OUTPUT

- name: Generate composer.lock
run: |
composer update --no-install
env:
COMPOSER_ROOT_VERSION: dev-master

- name: Cache composer cache
uses: actions/cache@v4
- name: Install Dependencies
uses: ramsey/composer-install@v3
with:
path: |
${{ steps.composer-cache.outputs.files_cache }}
${{ steps.composer-cache.outputs.vcs_cache }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Run composer install
run: composer install -o
composer-options: "--optimize-autoloader"
env:
COMPOSER_ROOT_VERSION: dev-master

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/shepherd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ jobs:
env:
fail-fast: true

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Install Dependencies
uses: ramsey/composer-install@v3
with:
composer-options: "--optimize-autoloader"
env:
COMPOSER_ROOT_VERSION: dev-master

Expand Down
27 changes: 3 additions & 24 deletions .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,31 +64,10 @@ jobs:

- uses: actions/checkout@v4

- name: Get Composer Cache Directories
id: composer-cache
run: |
echo "files_cache=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
echo "vcs_cache=$(composer config cache-vcs-dir)" >> $GITHUB_OUTPUT
shell: bash

- name: Generate composer.lock
run: |
composer update --no-install
env:
COMPOSER_ROOT_VERSION: dev-master

- name: Cache composer cache
uses: actions/cache@v4
- name: Install Dependencies
uses: ramsey/composer-install@v3
with:
path: |
${{ steps.composer-cache.outputs.files_cache }}
${{ steps.composer-cache.outputs.vcs_cache }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Run composer install
run: composer install -o
composer-options: "--optimize-autoloader"
env:
COMPOSER_ROOT_VERSION: dev-master

Expand Down