Skip to content

Commit

Permalink
ci/cd pipeline, scripts, pre commits
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorgedavyd committed Nov 17, 2024
1 parent 55f5c94 commit 3ff8627
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 25 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,15 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Set up scripts
run: |
sudo chmod +x ./scripts/*.sh
- name: Install dependencies
run: |
sudo sh ./scripts/requirements.sh
python3 -m pip install --upgrade pip
pip3 install pytest black
VERSION="0.0.$(date +%s)"
sed -i "s/{{VERSION_PLACEHOLDER}}/$VERSION/" corkit/__init__.py
pip install --no-build-isolation -e .
python3 update.py
- name: Run tests
run: |
sudo sh ./scripts/test.sh
- name: Commit to repo
if: matrix.commit == true
run: |
sudo sh ./scripts/autocommit.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pytest tests/
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black

5 changes: 0 additions & 5 deletions scripts/autocommit.sh

This file was deleted.

5 changes: 0 additions & 5 deletions scripts/requirements.sh

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/test.sh

This file was deleted.

0 comments on commit 3ff8627

Please sign in to comment.