Skip to content

Commit

Permalink
Test.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioannis-vm committed Jun 22, 2024
1 parent fb7b88d commit 14a0345
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 72 deletions.
32 changes: 0 additions & 32 deletions .github/workflows/deploy_to_pypi.yaml

This file was deleted.

22 changes: 12 additions & 10 deletions .github/workflows/format_and_lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,26 @@ jobs:
- name: Run Black
run: black -S .

- name: Check for changes after Black
- name: Check for changes
id: git_status
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
git status
if [[ `git status --porcelain` ]]; then
git add .
git commit -m "Format code with Black"
git add .
if git diff-index --quiet HEAD --; then
echo "No changes to commit" > /tmp/git_status_output
else
echo "No changes to commit"
git commit -m "Format code with Black"
echo "Changes committed" > /tmp/git_status_output
fi
continue-on-error: true

- name: Read git status output
id: read_git_status
run: cat /tmp/git_status_output

- name: Push changes
if: success() && steps.git_status.outputs.commit_message != ''
if: steps.read_git_status.outputs.result != 'No changes to commit'
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Run Flake8
run: flake8 .
30 changes: 0 additions & 30 deletions .github/workflows/tests.yaml

This file was deleted.

11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
repos:
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.4.2
hooks:
- id: black
# It is recommended to specify the latest version of Python
# supported by your project here, or alternatively use
# pre-commit's default_language_version, see
# https://pre-commit.com/#top_level-default_language_version
language_version: python3.10

0 comments on commit 14a0345

Please sign in to comment.