aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/check-generated-code-state.yml
blob: e79e14fba08dce1ffa42d79a05f5cd70c61d3675 (plain) (blame)
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
name: Check generated code state

on:
    push:
        branches:
            - "alpha"
    pull_request:

jobs:
    check:
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@v2
            - uses: rhysd/action-setup-vim@v1
              with:
                  neovim: true
                  version: v0.7.0

            - name: make generate
              run: make generate

            - name: Ensure there are no diffs
              run: |
                  git update-index -q --refresh
                  git diff
                  git diff-index --exit-code --quiet HEAD -- || {
                      echo '::error::Generated code is not up to date, run "make generate".';
                      exit 1;
                  }