|
| 1 | +name: Linting and style checking |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + pull_request: |
| 6 | + |
| 7 | +concurrency: |
| 8 | + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.actor }} |
| 9 | + cancel-in-progress: true |
| 10 | + |
| 11 | +jobs: |
| 12 | + stylua: |
| 13 | + name: Formatting |
| 14 | + runs-on: ubuntu-latest |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v4 |
| 17 | + - uses: JohnnyMorganz/stylua-action@v4 |
| 18 | + with: |
| 19 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 20 | + version: v2.1.0 |
| 21 | + # CLI arguments |
| 22 | + args: --color always --respect-ignores --check . |
| 23 | + |
| 24 | + gendoc: |
| 25 | + name: Document generation |
| 26 | + runs-on: ubuntu-latest |
| 27 | + steps: |
| 28 | + - name: Install Neovim |
| 29 | + uses: rhysd/action-setup-vim@v1 |
| 30 | + with: |
| 31 | + neovim: true |
| 32 | + version: v0.11.3 |
| 33 | + - uses: actions/checkout@v4 |
| 34 | + - name: Generate documentation |
| 35 | + run: make --silent documentation |
| 36 | + - name: Check for changes |
| 37 | + run: if [[ -n $(git status -s) ]]; then exit 1; fi |
| 38 | + |
| 39 | + lintcommit: |
| 40 | + name: Lint commits |
| 41 | + runs-on: ubuntu-latest |
| 42 | + env: |
| 43 | + LINTCOMMIT_STRICT: true |
| 44 | + steps: |
| 45 | + - name: Install Neovim |
| 46 | + uses: rhysd/action-setup-vim@v1 |
| 47 | + with: |
| 48 | + neovim: true |
| 49 | + version: v0.11.3 |
| 50 | + - uses: actions/checkout@v4 |
| 51 | + with: |
| 52 | + fetch-depth: 0 |
| 53 | + ref: ${{ github.event.pull_request.head.sha || github.ref }} |
| 54 | + - name: Lint new commits |
| 55 | + run: make --silent lintcommit-ci |
| 56 | + |
| 57 | + lint-filename-length: |
| 58 | + name: Lint filename lengths |
| 59 | + runs-on: ubuntu-latest |
| 60 | + steps: |
| 61 | + - uses: actions/checkout@v4 |
| 62 | + with: |
| 63 | + fetch-depth: 0 |
| 64 | + ref: ${{ github.event.pull_request.head.sha || github.ref }} |
| 65 | + - name: Lint filename legnths |
| 66 | + run: make --silent lint-filename-length-ci |
| 67 | + |
| 68 | + case-sensitivity: |
| 69 | + name: File case sensitivity |
| 70 | + runs-on: ubuntu-latest |
| 71 | + steps: |
| 72 | + - uses: actions/checkout@v4 |
| 73 | + with: |
| 74 | + fetch-depth: 0 |
| 75 | + - name: Check Case Sensitivity |
| 76 | + uses: credfeto/action-case-checker@v1.2.1 |
0 commit comments