Skip to content

chore: add check_format.yml #4

chore: add check_format.yml

chore: add check_format.yml #4

Workflow file for this run

---
name: check_format
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
jobs:
check_format:
steps:

Check failure on line 14 in .github/workflows/check_format.yml

View workflow run for this annotation

GitHub Actions / check_format

Invalid workflow file

The workflow is not valid. .github/workflows/check_format.yml (Line: 14, Col: 5): Required property is missing: runs-on
- uses: julia-actions/setup-julia@v1
with:
version: 1.8
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install JuliaFormatter
run: |
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))'
- name: Format code
run: |
git clean -f -x -d
julia -e 'using JuliaFormatter; format(".", verbose=true)'
- name: Fail if needs reformatting
run: |
if [[ $(git status --porcelain) ]]; then
echo "please reformat these files:"
git status --porcelain=v1
exit 1
fi