Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Each workflow file also starts with a comment block that shows a full example ca

**Read this first** (people and AI coding agents). To add these workflows to a
repository, follow [Adopt in an existing repository](#adopt-in-an-existing-repository).
These five rules prevent the common mistakes:
These six rules prevent the common mistakes:

1. **Start from a template** in [`workflow-templates/`](../../workflow-templates).
It sets the triggers, `concurrency` and `permissions`. Do not write the
Expand All @@ -28,8 +28,15 @@ These five rules prevent the common mistakes:
repository that justify the value: the database in `phpunit.xml`, a script
in `composer.json` or `package.json`, a step in the old workflow. With no
evidence, leave the input commented out, so the default applies. Do not copy
a recipe from this guide without that evidence.
5. **Verify.** Run the repository's own checks, open a pull request, and read
a recipe from this guide without that evidence. A value from the old
workflow is evidence only if the shared workflow gives the same
environment: for example, `pdo_mysql` from an old workflow with a MySQL
service is not.
5. **Check the test database first.** The shared workflows start no MySQL or
PostgreSQL service. If the tests use one (read `phpunit.xml`, then
`.env.testing` or `.env.example`), this is a blocker: see
[Environment and database](#environment-and-database) before you continue.
6. **Verify.** Run the repository's own checks, open a pull request, and read
the job logs. The required check becomes `ci / CI`.

AI coding agents: [`AGENTS.md`](../../AGENTS.md) at the repository root has
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/laravel-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
# (never an exact release such as @v0.1.4). Procedure for people and AI agents:
# https://github.com/scify/.github/blob/main/.github/workflows/README.md#adopt-in-an-existing-repository
#
# No database service: the tests must run on SQLite (the Laravel default in
# phpunit.xml). If they need MySQL or PostgreSQL, read "Environment and database"
# in the guide before you adopt this workflow.
#
# Minimal call (every value below is a default and can be left out):
#
# jobs:
Expand Down
5 changes: 4 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ Rules that cause failures when you break them:
Dependabot auto-merge and other workflows. **Every input you set needs
evidence**: a file and a line in the repository, for example a test suite in
`phpunit.xml` or a script in `composer.json`. With no evidence, keep the
default. Do not copy a recipe from the guide without that evidence.
default. Do not copy a recipe from the guide without that evidence. A value
from the old workflow is evidence only if the shared workflow gives the same
environment (for example, `pdo_mysql` from an old workflow with a MySQL
service is not).
**The workflow has no database service**: if the tests need MySQL or
PostgreSQL, stop and ask the user (see the guide's "Environment and
database").
Expand Down
2 changes: 2 additions & 0 deletions workflow-templates/laravel-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# Each commented-out input shows its default. Uncomment a line only to change it.
# The "e.g." comment shows other accepted values.
# In branch protection, require the check "ci / CI".
# No database service: the tests must run on SQLite. If they need MySQL or
# PostgreSQL, read "Environment and database" in the guide first.
name: CI

on:
Expand Down
Loading