Implement test workflow #4
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 Pytest on Pull Requests | |
on: | |
pull_request: | |
branches: [main] | |
jobs: | |
pytest: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
directory: ['game', 'monitor'] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install Poetry | |
run: curl -sSL https://install.python-poetry.org | python3 - | |
- name: Install dependencies | |
run: | | |
cd ${{ matrix.directory }} | |
python -m pip install --upgrade pip | |
poetry install --with test | |
- name: Run pytest | |
run: | | |
cd ${{ matrix.directory }} | |
poetry run pytest |