Skip to content

Commit

Permalink
Enhancement: Use ergebnis/composer-normalize as installed with composer
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Jun 23, 2020
1 parent 9d5f8e0 commit 8cc93f7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
php-version:
- "7.1"

dependencies:
- "locked"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
Expand All @@ -32,10 +35,23 @@ jobs:
- name: "Validate composer.json and composer.lock"
run: "composer validate --strict"

- name: "Run ergebnis/composer-normalize"
uses: "docker://ergebnis/composer-normalize-action:0.8.0"
- name: "Determine composer cache directory"
id: "determine-composer-cache-directory"
run: "echo \"::set-output name=directory::$(composer config cache-dir)\""

- name: "Cache dependencies installed with composer"
uses: "actions/cache@v2"
with:
args: "--dry-run"
path: "${{ steps.determine-composer-cache-directory.outputs.directory }}"
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

- name: "Install locked dependencies from composer.lock"
if: "matrix.dependencies == 'locked'"
run: "composer install --no-interaction --no-progress --no-suggest"

- name: "Run ergebnis/composer-normalize"
run: "composer normalize --dry-run"

tests:
name: "Tests"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ it: coding-standards tests ## Runs the coding-standards and tests target

.PHONY: coding-standards
coding-standards: vendor ## Normalizes composer.json with ergebnis/composer-normalize
docker run --interactive --rm --tty --workdir=/app --volume ${PWD}:/app ergebnis/composer-normalize-action:0.8.0
composer normalize

.PHONY: help
help: ## Displays this list of targets with descriptions
Expand Down

0 comments on commit 8cc93f7

Please sign in to comment.