Merge pull request #4 from UnravelSports/feat/big-data-bowl #46
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 and Check Formatting | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ['3.11'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# Linux/macOS - Install dependencies | |
- name: Install dependencies (Linux/macOS) | |
if: runner.os != 'Windows' # Only run on Linux/macOS | |
env: | |
PYTHONIOENCODING: utf-8 # Ensure Python uses UTF-8 encoding | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -e .[test] | |
shell: bash | |
# Windows - Install dependencies | |
- name: Install dependencies (Windows) | |
if: runner.os == 'Windows' # Only run on Windows | |
env: | |
PYTHONIOENCODING: utf-8 # Ensure Python uses UTF-8 encoding | |
PYTHONUTF8: 1 # Force Python to use UTF-8 mode | |
run: | | |
chcp 65001 # Change code page to UTF-8 | |
python -m pip install --upgrade pip setuptools | |
python -m pip install -e .[test] | |
shell: pwsh | |
- name: Code formatting | |
run: | | |
pip install "black[jupyter]==24.4.2" | |
black --check . | |
- name: Test with pytest | |
run: | | |
pytest --color=yes |