bombsquad-plugin-manager/.github/workflows/ci.yml
2026-08-23 15:38:35 +05:30

58 lines
1.6 KiB
YAML

name: CI
# Runs only on pushes to main - i.e. after a PR has been merged, or on a
# direct maintainer push. This is fully trusted, same-repo content, so it's
# safe for it to execute the tree and push directly. This is also the
# AUTHORITATIVE integrity check: test/test_checks.py's test_versions runs
# here unmodified/strict against real, permanent git history (unlike
# ci-check.yml, which can't yet resolve a commit sha for a brand-new plugin
# version and runs leniently instead).
on:
push:
branches:
- main
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: "3.12"
- name: Install Dependencies
run: |
python -m pip install -U pip
python -m pip install -U pycodestyle==2.12.1 autopep8
python -m pip install -U -r test/pip_reqs.txt
- name: Apply AutoPEP8
run: |
autopep8 --in-place --recursive --max-line-length=100 .
- name: Commit AutoPEP8 formatting
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: "[ci] apply-formatting"
- name: Apply Version Metadata
run: |
python test/auto_apply_version_metadata.py $(git log --pretty=format:'%h' -n 1)
- name: Commit Version Metadata
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: "[ci] apply-version-metadata"
- name: Execute Tests
run: |
python -m unittest discover -v