Skip to content

ci: add reusable GitHub Actions workflow for python tests - #41

Closed
ulbi wants to merge 1 commit into
mainfrom
optio/task-c2196651-d96e-4875-9ebe-ab073239b9dc
Closed

ulbi wants to merge 1 commit into
mainfrom
optio/task-c2196651-d96e-4875-9ebe-ab073239b9dc

Conversation

@ulbi

@ulbi ulbi commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Implements task c2196651-d96e-4875-9ebe-ab073239b9dc

What changed

Adds .github/workflows/ci.yml, a reusable CI workflow that runs the repository's existing python test suite:

  • Triggers on push and pull_request to main.
  • Runs on a minimal ubuntu-latest runner with Python set up via actions/setup-python (Python 3.x).
  • Installs the script's runtime dependencies (Pillow, exifread, piexif) — required because sortinfolder.py imports these at module load and the test invocation exercises it via --help.
  • Runs the existing test command: python3 test_sortinfolder.py.
  • Sets workflow-level permissions: read-all.
  • Disables Dependabot-triggered runs via a job-level if: github.actor != 'dependabot[bot]' guard, since Dependabot PRs execute with read-only permissions and no secrets.
  • "on" is quoted so the trigger key parses unambiguously under both YAML 1.1 (e.g. PyYAML, which would otherwise read it as a boolean) and GitHub's parser.

No other files were touched — the only change is the new workflow.

How to test

  1. Run the tests locally (already verified):
    pip install Pillow exifread piexif
    python3 test_sortinfolder.py
    
    → exits 0 (test passes; verified here and under pytest: 1 passed).
  2. Open a PR against main (this one) — the CI workflow runs the test job.
  3. Confirm the job surface: ubuntu-latest runner, Python setup step, dependencies installed, python3 test_sortinfolder.py executed, and that Dependabot PRs would be skipped by the github.actor guard.

🤖 Generated with Claude Code

Adds .github/workflows/ci.yml running python3 test_sortinfolder.py on
push and pull_request to main using a minimal ubuntu-latest runner with
actions/setup-python. Workflow permissions are set to read-all, and
runs triggered by Dependabot are skipped since they receive read-only
permissions and no secrets.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@ulbi ulbi closed this Oct 31, 2026
@ulbi
ulbi deleted the optio/task-c2196651-d96e-4875-9ebe-ab073239b9dc branch October 31, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant