fixing: identation error #52
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: CI | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | |
include: | |
- python-version: '3.12' | |
commit: false | |
- python-version: '3.8' | |
commit: false | |
- python-version: '3.9' | |
commit: false | |
- 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 | |
pip install pytest black pipreqs pip-tools | |
chmod +x requirements.sh | |
sh ./requirements.sh | |
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 }} |