fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
caa8683c
main
1name : Formatting 2 3on : 4push : 5branches : 6- main 7pull_request : 8types : 9- opened 10- synchronize 11 12jobs : 13code-format-checks : 14runs-on : ubuntu-latest 15steps : 16- uses : actions/checkout@v2 17- uses : DoozyX/clang-format-lint-action@v0.14 18with : 19source : '.' 20extensions : 'h,c,cc,proto' 21clangFormatVersion : 14 22- uses : actionsx/prettier@v2 23with : 24args : --config "${{ github.workspace }}/.prettierrc.toml" --write "**/*.{js,ts}" 25# Prettier has no diff view so we must make one ourselves 26# https://github.com/prettier/prettier/issues/6885 27- run : | 28git diff 29if [[ -n "$(git status --porcelain)" ]]; then 30exit 1 31fi 32- name : Set up Python 33uses : actions/setup-python@v2 34with : 35python-version : 3.11 36- name : Install dependencies 37run : | 38pip install 'black==24.10.0' 'isort==5.13.2' 39- name : Run black 40run : | 41python -m black --check --diff ./ 42- name : Run isort 43run : | 44 python -m isort --profile=black --check-only ./