mirror of
https://github.com/semantica-agi/semantica.git
synced 2026-09-10 04:00:35 +00:00
- setup-semantica action: pass extras/version through env vars instead
of interpolating ${{ inputs.* }} directly into the bash script, which
was a script-injection vector for any caller deriving these from
event/matrix data
- install-matrix: trigger on the Release workflow's completion
(workflow_run) instead of `release: published`, since the GitHub
release is created before the PyPI upload runs - the old trigger
could race the publish and silently verify the prior version; also
assert the installed version matches the triggering release tag
- examples/ci/github-actions.yml: pin actions/checkout and
actions/setup-python to the same verified commit SHAs used elsewhere
in this repo instead of mutable v5/v6 tags, and document how to pin
the setup-semantica@main reference for production use
- examples/ci templates + README: make the requirements.txt install
step conditional (guard with `-f requirements.txt`) and call out
pyproject.toml/Poetry/Pipenv as alternatives, since the templates
previously assumed every project has a requirements.txt; CircleCI's
cache key also no longer hashes a file that may not exist
21 lines
732 B
YAML
21 lines
732 B
YAML
# Drop this in as .gitlab-ci.yml in your own project.
|
|
semantica-test:
|
|
image: python:3.11-slim
|
|
cache:
|
|
paths:
|
|
- .cache/pip
|
|
variables:
|
|
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
|
|
script:
|
|
- pip install --upgrade pip
|
|
- pip install semantica
|
|
# Install your own project's dependencies however your project declares
|
|
# them - adjust this to match, e.g. `pip install -e .` for pyproject.toml
|
|
# / setup.cfg, or `poetry install`.
|
|
- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
- python -c "import semantica; print('semantica', semantica.__version__)"
|
|
- pytest
|
|
rules:
|
|
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
- if: '$CI_COMMIT_BRANCH == "main"'
|