🔧 Update CI workflow to use pre-commit action for formatting #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration | |
on: | |
push: | |
branches: | |
- main | |
pull_request: {} | |
jobs: | |
linting: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.13"] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: setup uv | |
uses: yezz123/[email protected] | |
with: | |
uv-venv: ".venv" | |
- name: Install Dependencies | |
run: uv sync --all-extras | |
- uses: pre-commit/[email protected] | |
with: | |
extra_args: --all-files --verbose | |
env: | |
SKIP: no-commit-to-branch | |
# https://github.com/marketplace/actions/alls-green#why | |
# used for branch protection checks | |
check: | |
if: always() | |
needs: [linting] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} |