[WIP] Run tests as part of the CI process #122
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: Code Quality Checks | |
on: [pull_request] | |
jobs: | |
code_quality: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
if: always() | |
run: | | |
pip install -r requirements.txt | |
- name: Format with Ruff | |
if: always() | |
run: ruff format --diff $(git ls-files *.py) | |
- name: Lint with Ruff | |
if: always() | |
run: ruff check $(git ls-files *.py) | |
test-python: | |
needs: code_quality | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
if: always() | |
run: | | |
pip install -r requirements.txt | |
- name: Smoke testing of PyTorch model | |
if: always() | |
run: | | |
python torch_nets/test_python_net.py |