Extracted watchdog into separate dependency group (#1309) #2735
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PythonTA Tests | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| dependency: ["base", "z3-solver"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Set up Node.js 24 | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - name: Set up graphviz | |
| run: | | |
| sudo apt-get install -y graphviz | |
| - name: Cache pip | |
| uses: actions/cache@v5.0.3 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('packages/python-ta/pyproject.yml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| ${{ runner.os }}- | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip setuptools wheel | |
| pip install -e ./packages/python-ta-z3 | |
| if [ "${{ matrix.dependency }}" == "z3-solver" ]; then | |
| pip install -e ./packages/python-ta[dev,cfg,watchdog,z3] | |
| else | |
| pip install -e ./packages/python-ta[dev,cfg,watchdog] | |
| fi | |
| - name: Run python-ta tests | |
| run: | | |
| if [ "${{ matrix.dependency }}" == "z3-solver" ]; then | |
| pytest -vv --cov python_ta --cov-config=./packages/python-ta/.coveragerc --cov-report lcov \ | |
| --ignore=./packages/python-ta/tests/test_type_constraints \ | |
| --ignore=./packages/python-ta/tests/test_type_inference \ | |
| --ignore=./packages/python-ta/tests/test_debug/test_accumulation_table.py \ | |
| --ignore=./packages/python-ta/tests/test_debug/test_recursion_table.py \ | |
| --ignore=./packages/python-ta/tests/test_debug/test_snapshot_tracer.py \ | |
| ./packages/python-ta/tests | |
| pytest -vv ./packages/python-ta/tests/test_debug/test_accumulation_table.py ./packages/python-ta/tests/test_debug/test_recursion_table.py ./packages/python-ta/tests/test_debug/test_snapshot_tracer.py | |
| else | |
| pytest -vv --cov python_ta --cov-config=./packages/python-ta/.coveragerc --cov-report lcov --exclude-z3 \ | |
| --ignore=./packages/python-ta/tests/test_type_constraints \ | |
| --ignore=./packages/python-ta/tests/test_type_inference \ | |
| --ignore=./packages/python-ta/tests/test_debug/test_accumulation_table.py \ | |
| --ignore=./packages/python-ta/tests/test_debug/test_recursion_table.py \ | |
| --ignore=./packages/python-ta/tests/test_debug/test_snapshot_tracer.py \ | |
| ./packages/python-ta/tests | |
| pytest -vv ./packages/python-ta/tests/test_debug/test_accumulation_table.py ./packages/python-ta/tests/test_debug/test_recursion_table.py ./packages/python-ta/tests/test_debug/test_snapshot_tracer.py | |
| fi | |
| - name: Upload python-ta test coverage to coveralls.io | |
| uses: coverallsapp/github-action@v2.3.7 | |
| env: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| flag-name: run-${{ matrix.python-version }}-${{ matrix.dependency }} | |
| parallel: true | |
| fail-on-error: false | |
| - name: Run python-ta-z3 tests | |
| if: matrix.dependency == 'base' | |
| run: | | |
| pytest -vv --cov python_ta_z3 --cov-report lcov ./packages/python-ta-z3 | |
| - name: Upload python-ta-z3 test coverage to coveralls.io | |
| if: matrix.dependency == 'base' | |
| uses: coverallsapp/github-action@v2.3.7 | |
| env: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| flag-name: run-${{ matrix.python-version }}-python-ta-z3 | |
| parallel: true | |
| fail-on-error: false | |
| finish: | |
| needs: test | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Coveralls Finished | |
| uses: coverallsapp/github-action@v2.3.7 | |
| env: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| parallel-finished: true | |
| carryforward: > | |
| run-3.10-base,run-3.10-z3-solver,run-3.11-base,run-3.11-z3-solver,run-3.12-base,run-3.12-z3-solver,run-3.13-base,run-3.13-z3-solver,run-3.14-base,run-3.14-z3-solver, | |
| run-3.10-python-ta-z3,run-3.11-python-ta-z3,run-3.12-python-ta-z3,run-3.13-python-ta-z3,run-3.14-python-ta-z3 | |
| fail-on-error: false | |
| docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python 3.14 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.14 | |
| - name: Cache pip | |
| uses: actions/cache@v5.0.3 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('packages/python-ta/pyproject.yml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| ${{ runner.os }}- | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip setuptools wheel | |
| pip install -e ./packages/python-ta-z3 ./packages/python-ta[dev,cfg,z3,watchdog] | |
| - name: Generate docs | |
| run: sphinx-build -b html -W docs docs/_build | |
| working-directory: packages/python-ta |