-
Notifications
You must be signed in to change notification settings - Fork 59
88 lines (83 loc) · 2.77 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4.1.7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Set up Node.js 18
uses: actions/setup-node@v4
with:
node-version: 18
- name: Set up graphviz
run: |
sudo apt-get install -y graphviz
- name: Cache pip
uses: actions/cache@v4.0.2
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,cfg,z3]
- name: Run tests
run: |
pytest -vv --cov python_ta --cov-config=.coveragerc --cov-report lcov --ignore=tests/test_type_constraints --ignore=tests/test_type_inference tests --ignore=tests/test_debug/test_accumulation_table.py --ignore=tests/test_debug/test_recursion_table.py
pytest -vv tests/test_debug/test_accumulation_table.py tests/test_debug/test_recursion_table.py
- name: Upload test coverage to coveralls.io
uses: coverallsapp/github-action@v2.3.0
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.3.0
env:
github-token: ${{ secrets.GITHUB_TOKEN }}
with:
parallel-finished: true
carryforward: "run-3.8,run-3.9,run-3.10,run-3.11,run-3.12"
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
- name: Set up Python 3.11
uses: actions/setup-python@v5.2.0
with:
python-version: 3.11
- name: Cache pip
uses: actions/cache@v4.0.2
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,cfg,z3]
- name: Generate docs
run: sphinx-build -b html -W docs docs/_build