diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 67820f4..7879a0b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -13,6 +13,15 @@ jobs: strategy: matrix: python-version: [3.8, 3.9, 3.11, 3.12] + include: + - python-version: 3.12 + commit: true + - python-version: 3.8 + commit: false + - python-version: 3.9 + commit: false + - python-version: 3.11 + commit: false steps: - name: Checkout repository @@ -35,15 +44,19 @@ jobs: pip install pytest black pip install -r requirements.txt + - name: Run tests + run: | + pytest tests/ + - name: Run black run: | black . + + - name: Commit to repo + if: matrix.commit == true + run: | 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/