Print package version in GitHub test Action #78
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: 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 |