Spaces:
Running on Zero
Running on Zero
| name: Continuous Integration & Automated Testing | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Cache pip packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ruff | |
| pip install -r requirements.txt | |
| - name: Run Ruff Linter | |
| run: | | |
| ruff check . --ignore E501,F401,F841,E402,UP,BLE001,S110,PLR --exit-zero | |
| - name: Run Pytest Suite | |
| run: | | |
| pytest -v tests/ | |
| - name: Run Benchmark Training Test | |
| run: | | |
| python train.py | |