Skip to content

chore(repo-assist): ci: add pytest workflow to run tests on push/PR #57

Description

@github-actions

🤖 This is an automated pull request from Repo Assist, an AI assistant.

Summary

Adds a new tests.yml GitHub Actions workflow that runs the test suite on every push to main and every pull request.

Motivation

Currently CI only runs HACS manifest and hassfest checks — no tests run automatically. The repo has ~1900 passing tests covering battery optimization, scheduling, and tariff logic. Running them on CI provides an important safety net.

Changes

  • .github/workflows/tests.yml — new workflow:
    • Triggers on push to main and pull_request targeting main
    • Uses Python 3.12 (matching .python-version and .cursor/environment.json)
    • Installs the same dependencies as the dev environment
    • Runs pytest tests/ with short tracebacks

Test Status

Baseline: 1931 passed, 58 failed, 13 warnings — the 58 failures are pre-existing test-isolation issues documented in AGENTS.md, not caused by this change.


Created by Repo Assist run #29970374985.


Warning

Protected Files — Push Permission Denied

This was originally intended as a pull request, but the patch modifies protected files. A human must create the pull request manually.

Protected files

The push was rejected because GitHub Actions does not have workflows permission to push these changes, and is never allowed to make such changes, or other authorization being used does not have this permission.

Create the pull request manually
# Download the patch from the workflow run
gh run download 29970374985 -n agent -D /tmp/agent-29970374985

# Create a new branch
git checkout -b repo-assist/eng-add-pytest-ci-2026-07-23-4c1397b7e0bb4057 main

# Apply the patch (--3way handles cross-repo patches)
git am --3way /tmp/agent-29970374985/aw-repo-assist-eng-add-pytest-ci-2026-07-23.patch

# Push the branch and create the pull request
git push origin repo-assist/eng-add-pytest-ci-2026-07-23-4c1397b7e0bb4057
gh pr create --title 'chore(repo-assist): ci: add pytest workflow to run tests on push/PR' --base main --head repo-assist/eng-add-pytest-ci-2026-07-23-4c1397b7e0bb4057 --repo Artic0din/PowerSync

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • awmgmcpg

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "awmgmcpg"

See Network Configuration for more information.

🤖 This is an automated response from Repo Assist. Generated by 🌈 Repo Assist; see workflow run. Learn more.
Comment /repo-assist to run again

Add this agentic workflow to your repo

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@1c6668b751c51af8571f01204ceffb19362e0f66

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentic-workflowsautomationCreated or maintained by repository automationrepo-assistCreated or maintained by GitHub Repo Assist

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions