diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml new file mode 100644 index 000000000000..69489e161845 --- /dev/null +++ b/.github/actions/setup/action.yml @@ -0,0 +1,19 @@ +runs: + using: "composite" + steps: + # https://github.com/actions/setup-python + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + # https://github.com/yezz123/setup-uv + - name: Setup venv with package dependencies + uses: yezz123/setup-uv@v4 + with: + uv-version: "0.1.24" + - name: Setup package dependencies + run: uv venv; uv pip install --system ruff + shell: bash + - name: Check command availability + run: ruff -V + shell: bash diff --git a/.github/workflows/check-format.yml b/.github/workflows/check-format.yml new file mode 100644 index 000000000000..8d57c77dc7ff --- /dev/null +++ b/.github/workflows/check-format.yml @@ -0,0 +1,15 @@ +name: Format + +on: + pull_request: + +jobs: + format: + name: Check code formatting + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Setup Python + uses: ./.github/actions/setup + - run: ruff format --check