polish tests, git hook #20
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 workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: build | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] # macos-13 (intel) did not work because it requires a different version of pytorch | |
python-version: ["3.10", "3.12"] #, "3.13"] python v 3.13 did not work for the 3 OS tested. TODO: fix this | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies (Unix) | |
if: runner.os != 'Windows' | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install pytest | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Install dependencies (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install pytest | |
if (Test-Path requirements.txt) { pip install -r requirements.txt } | |
- name: Build Package | |
run: | | |
pip install -e . -v | |
# - name: Run tests | |
# run: | | |
# pytest |