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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CI

# GitHub Actions is disabled on this repository on purpose. Run this file
# locally with act, for example: act pull_request -W .github/workflows/ci.yml
# Runs as GitHub Actions on self-hosted runner-up machines (runs-on: linux-x64).
# Read results with `gh pr checks` and failures with `gh run view --log-failed`.

on:
push:
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
with:
persist-credentials: false
# The files are copied into the container, not bind-mounted, so this
# works the same on a hosted runner and under act.
# works even when the Docker daemon cannot see the runner's paths.
- name: php -l on every PHP file, theme and dev harness
run: |
set -euo pipefail
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,14 @@ The theme folder is mounted read-only, so edits show up on reload. `tools/wp-dev

## Checks

CI is `.github/workflows/ci.yml`. GitHub Actions is off for this repository, so run it locally with [act](https://github.com/nektos/act):
CI is `.github/workflows/ci.yml`, run as GitHub Actions on self-hosted runner-up machines for pull requests and pushes to `main`. Push the branch, then read the result with `gh pr checks` and any failure with `gh run view --log-failed`. To check locally, run the commands each job runs, for example:

```sh
act pull_request -W .github/workflows/ci.yml
node tools/build-tokens.mjs --check
npm ci --prefix tools && node tools/check-theme-json.mjs
```

It checks that the generated files are up to date, that `theme.json` and the style files match the WordPress schema (`npm ci --prefix tools && node tools/check-theme-json.mjs`), that every PHP file passes `php -l` on PHP 7.4 and 8.4, and every Hugo and Ghost check in the sections below.
CI checks that the generated files are up to date, that `theme.json` and the style files match the WordPress schema (`npm ci --prefix tools && node tools/check-theme-json.mjs`), that every PHP file passes `php -l` on PHP 7.4 and 8.4, and every Hugo and Ghost check in the sections below.

## Build and check the Hugo theme

Expand Down
Loading