Skip to content

Commit 8dbd3ab

Browse files
authored
Merge branch 'main' into claude/wp-cli-pr-6365-landing-slkyfp
2 parents 789af95 + 902de26 commit 8dbd3ab

40 files changed

Lines changed: 5048 additions & 178 deletions

‎.gherkin-lintrc‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"file-name": [
3+
"on",
4+
{
5+
"style": "kebab-case"
6+
}
7+
],
8+
"indentation": [
9+
"on",
10+
{
11+
"Feature": 0,
12+
"Background": 2,
13+
"Scenario": 2,
14+
"Examples": 4,
15+
"Step": 4,
16+
"given": 4,
17+
"example": 6,
18+
"and": 4
19+
}
20+
],
21+
"no-dupe-feature-names": "on",
22+
"no-dupe-scenario-names": "off",
23+
"no-empty-file": "on",
24+
"no-files-without-scenarios": "on",
25+
"no-multiple-empty-lines": "off",
26+
"no-partially-commented-tag-lines": "on",
27+
"no-trailing-spaces": "off",
28+
"no-unnamed-features": "on",
29+
"no-unnamed-scenarios": "on",
30+
"no-scenario-outlines-without-examples": "on",
31+
"use-and": "on"
32+
}

‎.github/actionlint.yml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Configuration for actionlint, run by the `actionlint` job in
2+
# `.github/workflows/reusable-code-quality.yml`.
3+
paths:
4+
.github/workflows/**/*.{yml,yaml}:
5+
ignore:
6+
# `copilot-requests` is a real permission scope - it is what lets a
7+
# workflow authenticate the Copilot CLI with the built-in `GITHUB_TOKEN`
8+
# instead of a personal access token - but actionlint's hard-coded scope
9+
# list has not caught up with it yet, so it reports every use as unknown.
10+
# Drop this entry once actionlint ships the scope, and it will go back to
11+
# catching genuine typos in permission names.
12+
# See https://docs.github.com/en/copilot/how-tos/copilot-cli/use-copilot-cli-in-actions
13+
- 'unknown permission scope "copilot-requests"'

‎.github/dependabot.yml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@ updates:
99
- scope:distribution
1010
cooldown:
1111
default-days: 7
12+
# Only wp-cli-tests carries a package.json, holding the pinned version of the
13+
# Gherkin linter. This is a no-op in every other repository.
14+
- package-ecosystem: npm
15+
directory: "/"
16+
schedule:
17+
interval: daily
18+
open-pull-requests-limit: 10
19+
labels:
20+
- scope:distribution
21+
cooldown:
22+
default-days: 7
1223
- package-ecosystem: github-actions
1324
directory: "/"
1425
schedule:

‎.github/workflows/copilot-setup-steps.yml‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ jobs:
1919
permissions:
2020
contents: read
2121

22+
env:
23+
MYSQL_HOST: 127.0.0.1
24+
MYSQL_TCP_PORT: 3306
25+
WP_CLI_TEST_DBROOTUSER: root
26+
WP_CLI_TEST_DBROOTPASS: root
27+
WP_CLI_TEST_DBNAME: wp_cli_test
28+
WP_CLI_TEST_DBUSER: wp_cli_test
29+
WP_CLI_TEST_DBPASS: password1
30+
WP_CLI_TEST_DBHOST: 127.0.0.1:3306
31+
2232
steps:
2333
- name: Checkout code
2434
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -45,3 +55,28 @@ jobs:
4555
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
4656
env:
4757
COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }}
58+
59+
# Without a database the Behat runner silently falls back to SQLite, so the
60+
# agent's test runs are not the ones CI will do. Mirrors the setup in
61+
# reusable-functional.yml.
62+
- name: Check existence of behat.yml file
63+
id: check_behat_file
64+
run: echo "files_exists=$(test -f behat.yml && echo true || echo false)" >> "$GITHUB_OUTPUT"
65+
66+
- name: Setup MySQL Server
67+
if: steps.check_behat_file.outputs.files_exists == 'true'
68+
uses: shogo82148/actions-setup-mysql@62da9377d83991fce27b6ed2a397d3306121e41d # v1
69+
with:
70+
mysql-version: '8.0' # Standard MySQL version for these tests
71+
auto-start: true
72+
root-password: ${{ env.WP_CLI_TEST_DBROOTPASS }}
73+
user: ${{ env.WP_CLI_TEST_DBUSER }}
74+
password: ${{ env.WP_CLI_TEST_DBPASS }}
75+
76+
- name: Remove system MySQL binary
77+
if: steps.check_behat_file.outputs.files_exists == 'true'
78+
run: sudo rm -f /usr/bin/mysql /usr/bin/mysqldump
79+
80+
- name: Prepare test database
81+
if: steps.check_behat_file.outputs.files_exists == 'true'
82+
run: composer prepare-tests

‎.github/workflows/issue-triage.yml‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,17 @@ name: Issue and PR Triage
1616
permissions:
1717
issues: write
1818
pull-requests: write
19-
actions: write
2019
contents: read
21-
models: read
20+
# A caller can only cap a reusable workflow's permissions, so the scope the
21+
# Copilot CLI needs has to be granted here too. `models: read` was for the
22+
# GitHub Models provider, which `actions/ai-inference` v3 removed.
23+
copilot-requests: write
24+
# A caller can only cap a reusable workflow's permissions, never raise them,
25+
# so `actions: write` has to be granted here for the dispatch job downstream
26+
# to work at all. The reusable workflow narrows it to that single job, so the
27+
# `pull_request_target` job does not receive it. Removing it here breaks
28+
# dispatching (see #271/#272); narrow it there instead.
29+
actions: write
2230

2331
jobs:
2432
issue-triage:

0 commit comments

Comments
 (0)