tinygrad/.github/workflows/test.yml

33 lines
808 B
YAML

name: Unit Tests
on: [push, pull_request]
jobs:
lines:
name: Less than 1000 lines
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Install SLOCCount
run: sudo apt install sloccount
- name: Check <1000 lines
run: if [ $(sloccount test tinygrad | sed -n 's/.*Total Physical Source Lines of Code (SLOC)[ ]*= \([^ ]*\).*/\1/p' | tr -d ',') -gt 1000 ]; then exit 1; fi
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Dependencies
run: pip install -r requirements.txt
- name: Run Pytest
run: python -m pytest -s -v