-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (40 loc) · 1.27 KB
/
run-tests.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
name: Run Tests
on:
pull_request:
push:
branches: [master, main, dev]
env:
FORCE_COLOR: 1
jobs:
test:
name: Python ${{ matrix.python-version }} (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Display Python version (${{ matrix.python-version }})
run: python -c "import sys; print(sys.version)"
- name: Display package version
run: python -c "import automata; print(automata.__version__)"
# Skip for Windows; path setting there isn't worth the trouble
- name: Run eyeball tests
if: runner.os != 'Windows'
run: |
pip install termcolor
PYTHONPATH=. python tests/eyeball.py
- name: Test with pytest
run: |
pip install pytest
pytest tests/ --maxfail=3 --showlocals --color=yes -v