Skip to content

Commit

Permalink
setting up the continuous integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorgedavyd committed May 31, 2024
1 parent bec51d0 commit b09f71c
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/

0 comments on commit b09f71c

Please sign in to comment.