-
Notifications
You must be signed in to change notification settings - Fork 117
58 lines (54 loc) · 1.58 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
name: Test
on:
push:
branches:
- main
pull_request:
jobs:
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: pip
- run: python3 -m pip install mypy
- run: mypy sv_ttk/__init__.py
pytest:
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12.0-beta.3"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
- run: |
python3 -m pip install pytest
- uses: GabrielBB/xvfb-action@v1.4
with:
run: python3 -m pytest
# Separate from other pytests because tkinter doesn't work on macos with actions/setup-python.
# It imports, but gives this error: RuntimeError: tk.h version (8.6) doesn't match libtk.a version (8.5)
pytest-macos:
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
env:
TCLLIBPATH: ./lib
PYTHON: /usr/local/opt/python@${{ matrix.python-version }}/libexec/bin/python
steps:
- uses: actions/checkout@v3
- run: brew install python@${{ matrix.python-version }}
- if: matrix.python-version != '3.8'
run: brew install python-tk@${{ matrix.python-version }}
- run: $PYTHON --version
- run: |
python3 -m pip install .
python3 -m pip install pytest
python3 -m pytest