format.yaml 879 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. name: format
  2. on:
  3. push:
  4. branches: "**"
  5. pull_request:
  6. branches:
  7. - "master"
  8. - "rolling"
  9. jobs:
  10. stylua-check:
  11. name: "Formatting check with Stylua"
  12. runs-on: ubuntu-20.04
  13. steps:
  14. - uses: actions/checkout@v2
  15. - name: Lint with stylua
  16. uses: JohnnyMorganz/stylua-action@1.0.0
  17. with:
  18. token: ${{ secrets.GITHUB_TOKEN }}
  19. # CLI arguments
  20. args: --check .
  21. shfmt-check:
  22. name: "Formatting check with shfmt"
  23. runs-on: ubuntu-20.04
  24. steps:
  25. - uses: actions/checkout@v2
  26. - name: Setup Go
  27. uses: actions/setup-go@v2
  28. with:
  29. go-version: "1.16"
  30. - name: Use shfmt
  31. run: |
  32. GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt
  33. # https://google.github.io/styleguide/shellguide.html
  34. - name: Check formatting
  35. run: make style-sh