Skip to content

Merge branch 'main' of https://github.com/Jorgedavyd/LighTorch #2

Merge branch 'main' of https://github.com/Jorgedavyd/LighTorch

Merge branch 'main' of https://github.com/Jorgedavyd/LighTorch #2

Workflow file for this run

name: CI
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
matrix:
python-version: [3.8, 3.9, 3.11, 3.12]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up dependencies
run: |
python -m pip install --upgrade pip
pip install pipreqs pip-tools
chmod +x requirements.sh
sh ./requirements.sh
- name: Install dependencies
run: |
pip install pytest black
pip install -r requirements.txt
- name: Run black
run: |
black .
git config --global user.name 'Jorgedavyd'
git config --global user.email 'jorged.encyso@gmail.com'
git diff --exit-code || (git add . && git commit -m "Automatically formatted with black" && git push)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run tests
run: |
pytest tests/