mirror of
https://github.com/microsoft/autogen.git
synced 2026-01-13 23:47:55 -05:00
32 lines
816 B
YAML
32 lines
816 B
YAML
name: Code formatting
|
|
|
|
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
|
|
on: # Trigger the workflow on pull request or merge
|
|
pull_request:
|
|
branches: ["0.2"]
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
permissions: {}
|
|
# actions: read
|
|
# checks: read
|
|
# contents: read
|
|
# deployments: read
|
|
jobs:
|
|
|
|
pre-commit-check:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
SKIP: "mypy"
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
- name: Set $PY environment variable
|
|
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: ~/.cache/pre-commit
|
|
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
|
- uses: pre-commit/action@v3.0.1
|