yaml syntax #2
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: test | ||
on: | ||
push: {branches: [master]} # pushes to master | ||
pull_request: {} # all PRs | ||
jobs: | ||
pytest: | ||
strategy: | ||
matrix: | ||
python-version: ['3.8', '3.12'] | ||
os: ['ubuntu-latest', 'windows-latest', 'macOs-13'] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Dependencies | ||
run: | | ||
pip install --upgrade -r requirements.txt -r requirements-test.txt | ||
pip install -e . | ||
- name: Unit Test | ||
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macOs-latest' | ||
run: | | ||
pip install pytest | ||
pytest test/util.py test/metadata.py test/integration/dummy.py test/integration/vaswani.py test/formats/ test/test_defaulttext.py | ||
- name: Unit Test (Windows) | ||
if: matrix.os == 'windows-latest' | ||
shell: cmd | ||
run: | | ||
pip install pytest | ||
pytest test\util.py test\metadata.py test\integration\dummy.py test\integration\vaswani.py test\formats\ test\test_defaulttext.py | ||
env: | ||
PATH: 'C:/Program Files/zlib/bin/' |