feat(check-extension): allow configuraton via .github/check-extension.json (#269)

This commit is contained in:
Damien Retzinger
2026-05-17 19:08:26 -04:00
parent 35c1ace2bc
commit 0bf08ef692
2 changed files with 37 additions and 3 deletions
+20 -3
View File
@@ -42,10 +42,23 @@ on:
description: "Your composer credentials (typically a stringified json object of the contents of your auth.json)" description: "Your composer credentials (typically a stringified json object of the contents of your auth.json)"
jobs: jobs:
compute_resolved:
runs-on: ubuntu-latest
outputs:
resolved: ${{ steps.resolve.outputs.resolved }}
steps:
- uses: graycoreio/github-actions-magento2/resolve-check-config@main
id: resolve
with:
kind: extension
matrix: ${{ inputs.matrix }}
unit-test-extension: unit-test-extension:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
needs: compute_resolved
if: ${{ fromJSON(needs.compute_resolved.outputs.resolved)['unit-test-extension'].enabled != false }}
strategy: strategy:
matrix: ${{ fromJSON(inputs.matrix) }} matrix: ${{ fromJSON(needs.compute_resolved.outputs.resolved)['unit-test-extension'].matrix }}
fail-fast: ${{ inputs.fail-fast }} fail-fast: ${{ inputs.fail-fast }}
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
@@ -113,8 +126,10 @@ jobs:
compile-extension: compile-extension:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
needs: compute_resolved
if: ${{ fromJSON(needs.compute_resolved.outputs.resolved)['compile-extension'].enabled != false }}
strategy: strategy:
matrix: ${{ fromJSON(inputs.matrix) }} matrix: ${{ fromJSON(needs.compute_resolved.outputs.resolved)['compile-extension'].matrix }}
fail-fast: ${{ inputs.fail-fast }} fail-fast: ${{ inputs.fail-fast }}
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
@@ -201,8 +216,10 @@ jobs:
integration_test: integration_test:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
needs: compute_resolved
if: ${{ fromJSON(needs.compute_resolved.outputs.resolved)['integration_test'].enabled != false }}
strategy: strategy:
matrix: ${{ fromJSON(inputs.matrix) }} matrix: ${{ fromJSON(needs.compute_resolved.outputs.resolved)['integration_test'].matrix }}
fail-fast: ${{ inputs.fail-fast }} fail-fast: ${{ inputs.fail-fast }}
services: ${{ matrix.services }} services: ${{ matrix.services }}
steps: steps:
+17
View File
@@ -18,6 +18,23 @@ See the [check-extension.yaml](../../.github/workflows/check-extension.yaml)
The Magento matrix format outlined by the [supported versions action.](https://github.com/graycoreio/github-actions-magento2/tree/main/supported-version/supported.json) The Magento matrix format outlined by the [supported versions action.](https://github.com/graycoreio/github-actions-magento2/tree/main/supported-version/supported.json)
## Configuration
Each check can be toggled on/off through an optional `.github/check-extension.json` file in the repo that calls this workflow.
You can learn more about this file here in the [`resolve-check-config` action.](../../resolve-check-config/README.md):
Reference the published JSON Schema with `$schema` to get autocompletion and inline validation in editors that support it:
```json
{
"$schema": "https://raw.githubusercontent.com/graycoreio/github-actions-magento2/main/resolve-check-config/check-extension.schema.json",
"jobs": {
"integration_test": false
}
}
```
## Usage ## Usage
```yml ```yml