Refactored how templates are handled #54
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Do not edit this file! Make a pull request on changing | |
# github/workflows/composer.yaml in | |
# https://github.com/itk-dev/devops_itkdev-docker if need be. | |
### ### Composer | |
### | |
### Validates composer.json and checks that it's normalized. | |
### | |
### #### Assumptions | |
### | |
### 1. A docker compose service named `phpfpm` can be run and `composer` can be | |
### run inside the `phpfpm` service. | |
### 2. [ergebnis/composer-normalize](https://github.com/ergebnis/composer-normalize) | |
### is a dev requirement in `composer.json`: | |
### | |
### ``` shell | |
### docker compose run --rm phpfpm composer require --dev ergebnis/composer-normalize | |
### ``` | |
### | |
### Normalize `composer.json` by running | |
### | |
### ``` shell | |
### docker compose run --rm phpfpm composer normalize | |
### ``` | |
name: Composer | |
env: | |
COMPOSE_USER: runner | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- develop | |
jobs: | |
composer-validate: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
docker network create frontend | |
docker compose run --rm phpfpm composer validate --strict | |
composer-normalized: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
docker network create frontend | |
docker compose run --rm phpfpm composer install | |
docker compose run --rm phpfpm composer normalize --dry-run | |
composer-audit: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
docker network create frontend | |
docker compose run --rm phpfpm composer audit --locked |