diff --git a/.github/workflows/format_and_lint.yaml b/.github/workflows/format_and_lint.yaml deleted file mode 100644 index 60e2ddd..0000000 --- a/.github/workflows/format_and_lint.yaml +++ /dev/null @@ -1,36 +0,0 @@ -name: Format and Lint Code -on: - push: -permissions: - contents: write -jobs: - format_and_lint: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - name: Run Black - uses: psf/black@stable - with: - options: "-S" - - name: Commit changes - run: | - git config --global user.name 'GitHubBot' - git config --global user.email 'GitHubBot@users.noreply.github.com' - git add . - if git diff-index --quiet HEAD --; then - echo "No changes to commit." - else - git commit -m "Format code with Black." - git push - fi - - name: Install Flake8 - run: | - python -m pip install --upgrade pip - pip install flake8 - - name: Run Flake8 - run: flake8 . diff --git a/.github/workflows/format_check.yml b/.github/workflows/format_check.yml new file mode 100644 index 0000000..294f1e4 --- /dev/null +++ b/.github/workflows/format_check.yml @@ -0,0 +1,11 @@ +name: Ruff format +on: [push, pull_request] +jobs: + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: chartboost/ruff-action@v1 + with: + args: 'format --check' + version: 0.7.0 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..2546c0e --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,10 @@ +name: Ruff check +on: [push, pull_request] +jobs: + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: chartboost/ruff-action@v1 + with: + version: 0.7.0 diff --git a/.github/workflows/spell_check.yml b/.github/workflows/spell_check.yml new file mode 100644 index 0000000..c894573 --- /dev/null +++ b/.github/workflows/spell_check.yml @@ -0,0 +1,15 @@ +name: Spell Check + +on: [push, pull_request] + +jobs: + spell-check: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Run codespell + uses: codespell-project/actions-codespell@v2 +