Skip to content

feat(hermes): npm package + status contract tests for the TinyFish plugin (PF-3818) #23

feat(hermes): npm package + status contract tests for the TinyFish plugin (PF-3818)

feat(hermes): npm package + status contract tests for the TinyFish plugin (PF-3818) #23

Workflow file for this run

name: Hermes CI
on:
pull_request:
branches: [main]
paths:
- ".github/workflows/hermes-ci.yml"
- "hermes/**"
push:
branches: [main]
paths:
- ".github/workflows/hermes-ci.yml"
- "hermes/**"
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: hermes
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-python@v6
with:
python-version: "3.12"
# plugin.yaml is authoritative for X-TF-Client-Version on directory installs,
# so pyproject.toml drifting past it ships a stale version header silently.
- name: plugin.yaml version matches pyproject.toml
run: |
set -euo pipefail
manifest=$(sed -n 's/^version:[[:space:]]*//p' plugin.yaml | head -1 | tr -d "\"' ")
project=$(sed -n 's/^version[[:space:]]*=[[:space:]]*"\(.*\)"/\1/p' pyproject.toml | head -1)
echo "plugin.yaml=$manifest pyproject.toml=$project"
# Both parsers are regex-based: an unparsed file yields "" on both sides
# and would compare equal, passing the check it is meant to fail.
if [ -z "$manifest" ] || [ -z "$project" ]; then
echo "::error file=hermes/plugin.yaml::could not parse a version from plugin.yaml or pyproject.toml"
exit 1
fi
if [ "$manifest" != "$project" ]; then
echo "::error file=hermes/plugin.yaml::plugin.yaml is $manifest but pyproject.toml is $project"
exit 1
fi
- run: python -m pip install --upgrade pip
- run: python -m pip install -e . -r requirements-dev.txt
- run: make lint
- run: make test
- run: python -m build