Skip to content

f2 api client

f2 api client #11

Workflow file for this run

# 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@v5
- name: Create docker network
run: |
docker network create frontend
- run: |
docker compose run --rm phpfpm composer validate --strict
composer-normalized:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v5
# https://github.com/mxschmitt/action-tmate?tab=readme-ov-file#manually-triggered-debug
# Enable tmate debugging if debug logging is enabled (cf.
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#runner-context)
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: false
if: 1 == runner.debug
- name: Create docker network
run: |
docker network create frontend
- run: |
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@v5
- name: Create docker network
run: |
docker network create frontend
- run: |
docker compose run --rm phpfpm composer audit