gan now functional, corrected bug in automted testing #211
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: Unit tests for custom PyTorch operations | |
on: | |
push: | |
paths: | |
- "testing/**" | |
- "adell_mri/**" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip uv | |
uv pip install --python $(which python) ruff pytest | |
if [ -f testing/requirements.txt ]; then uv pip install --python $(which python) -r testing/requirements.txt; fi | |
- name: Lint with ruff | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
ruff check . --select=E9,F63,F7,F82 | |
- name: Test with pytest | |
run: | | |
pytest testing |