summaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
blob: 7728a28cabcaf86fb7d56aa6962945699f161f91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
name: run shellcheck and shfmt
on:
  push:
    paths:
      - 'tessen'
  pull_request:
    paths:
      - 'tessen'
jobs:
  lint:
    name: use shellcheck to lint tessen
    runs-on: ubuntu-latest
    container:
      image: koalaman/shellcheck-alpine:stable
    steps:
      - name: checkout tessen for shellcheck
        uses: actions/checkout@v2
      - name: run shellcheck
        run: shellcheck tessen
  format:
    name: use shfmt to check tessen code format
    runs-on: ubuntu-latest
    container:
      image: mvdan/shfmt:v3.4.2-alpine
    steps:
      - name: checkout tessen for shfmt
        uses: actions/checkout@v2
      - name: run shfmt
        run: shfmt -d -s -i 2 -bn -ci -sr tessen