mirror of
https://github.com/agentrhq/authsome.git
synced 2026-09-19 01:34:19 +08:00
ff592fde59
Calling setActiveView/setConnectionFilter inside useEffect body triggered the react-hooks/set-state-in-effect lint error. Initialise both states directly from URL params via lazy useState initialisers so no effect is needed, and remove the now-unused useEffect import. Also scope Docker build to version tags only (release-please triggers), and restrict Python Tests to push/PR against main. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
48 lines
1.0 KiB
YAML
48 lines
1.0 KiB
YAML
name: Python Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'src/**'
|
|
- 'tests/**'
|
|
- 'pyproject.toml'
|
|
- 'uv.lock'
|
|
- '.github/workflows/python-test.yml'
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'src/**'
|
|
- 'tests/**'
|
|
- 'pyproject.toml'
|
|
- 'uv.lock'
|
|
- '.github/workflows/python-test.yml'
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: astral-sh/setup-uv@v5
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.13"
|
|
|
|
- name: Install dependencies
|
|
run: uv pip install --system -e ".[dev]"
|
|
|
|
- name: Run tests with coverage
|
|
run: uv run pytest --cov=authsome --cov-report=xml --cov-report=term -p no:xdist
|
|
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v4
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
file: ./coverage.xml
|
|
fail_ci_if_error: false
|