New function validate-invariants #693
Workflow file for this run
This file contains 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: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up graphviz | |
run: | | |
sudo apt-get install -y graphviz | |
- name: Cache pip | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
${{ runner.os }}- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
pip install -e .[dev,z3] | |
- name: Run tests | |
run: | | |
pytest --cov python_ta --cov-config=.coveragerc --cov-report lcov --ignore=tests/test_type_constraints --ignore=tests/test_type_inference tests --ignore=tests/test_debug | |
pytest tests/test_debug | |
- name: Upload test coverage to coveralls.io | |
uses: coverallsapp/github-action@v2 | |
env: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
flag-name: run-${{ matrix.python-version }} | |
parallel: true | |
finish: | |
needs: test | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
uses: coverallsapp/github-action@v2 | |
env: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
parallel-finished: true | |
carryforward: "run-3.8,run-3.9,run-3.10,run-3.11" |