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
43 changes: 43 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,49 @@ jobs:
python3 -c 'from mache import match_estimate, rating_estimate'
test "$REPORTED" = "$(python3 -c 'import mache; print(mache.__version__)')"

root:
# The action at the root, which the Marketplace lists, called the way a
# caller calls it: games already on the runner, found by a pattern, and
# nothing set up first. The runner's own python3 is all it needs.
runs-on: ubuntu-latest
timeout-minutes: 10
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Lay the games out as two downloaded shards
run: |
for shard in 0 1; do
mkdir -p "downloaded/shard-${shard}"
cp tests/fixtures/pairs.pgn "downloaded/shard-${shard}/games.pgn"
done

- uses: ./ # zizmor: ignore[self-repository]
id: estimate
with:
pgn: downloaded/**/games.pgn
candidate: new
baseline: old
time_control: 10+0.1
sprt: true

- name: It read both shards and judged the test
env:
LINE: ${{ steps.estimate.outputs.line }}
VERDICT: ${{ steps.estimate.outputs.verdict }}
CARRIED: ${{ steps.estimate.outputs.carried }}
run: |
case "$LINE" in
*"(52 games), SPRT [0, 10] "*) ;;
*) echo "::error::the line reads ${LINE}"; exit 1 ;;
esac
test "$VERDICT" = inconclusive
test "$CARRIED" = 2,4,12,6,2

orchestration:
# The actions a caller runs before anything is built. Each is checked
# through its outputs, because outputs are the part a workflow author
Expand Down
19 changes: 16 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ on it: the reusable workflows pin the actions beside them, those pins have to
name the version being released, and `GITHUB_TOKEN` may not write under
`.github/workflows/`, so the workflow cannot move them itself.
`.github/workflows/README.md` says what the pins are.
The calls shown in `examples/`, `docs/QUICKSTART.md` and
`.github/workflows/README.md` name the same version and move in the same
commit. `tests/test_examples.py` holds them to it.
The calls shown in `examples/`, `docs/QUICKSTART.md`,
`.github/workflows/README.md` and the README's call of the root action name the
same version and move in the same commit. `tests/test_examples.py` holds them to
it.
Merging that pull request tags `vX.Y.Z` on
the commit that carries the version and starts the release, which refuses a tag
that does not match `__version__`, builds the sdist and the wheel, publishes
Expand All @@ -61,6 +62,18 @@ The `--json` shape is a contract from `0.1.0` on. `JSON_FORMAT` says which
shape, fields are added and not removed, and a change that cannot be made that
way raises the number.

## The action at the root and the site

`action.yml` at the root is the one GitHub Marketplace lists. It runs the
package from its own checkout, so it has no pin to move. Whether a release is
listed is set on the GitHub release itself, by its Marketplace checkbox.

`docs/` is the site GitHub Pages builds, with Jekyll and the theme named in
`docs/_config.yml`. Each page's address and place in the menu are set there
rather than in front matter, which GitHub would show as a table when the file
is read in the repository. A link out of `docs/` is written as a full URL,
since the site has nothing above it. `tests/test_docs.py` checks both.

## What stays out of this repository

Planning documents, unless one has been asked for. Keep them in a scratch
Expand Down
Loading
Loading