more badge work #7
This file contains hidden or 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
# This file is a GitHub Actions workflow configuration file that runs Pytest on pushes and pull requests to the main and dev branches. It sets up a matrix of Python versions (3.8 and 3.9) to test against, checks out the code, installs dependencies, and runs the tests using Pytest. | |
name: pytest | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
pull_request: | |
branches: | |
- main | |
- dev | |
jobs: | |
test: | |
# runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] # Specify the OS versions to test against | |
python-version: ["3.8", "3.9"] # Specify the Python versions to test against | |
runs-on: ${{ matrix.os }} # Use the OS from the matrix | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} # Use the version from the matrix | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[dev] | |
# pip install pytest # Add any other dependencies your project needs | |
- name: Run tests | |
run: | | |
pytest -v |