Skip to content

fixing ci cd

fixing ci cd #25

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.10', '3.11']
include:
- python-version: '3.11'
commit: false
- python-version: '3.10'
commit: true
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
sudo apt-get install python3-dev -y
pip install pytest black pipreqs pip-tools
pip install -r requirements.txt
- name: Run tests
run: |
pytest tests/
- name: Commit to repo
if: matrix.commit == true
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 }}