github.com/ydb-platform/ydb-go-sdk/v3@v3.57.0/.github/workflows/check-codegen.yml (about)

     1  name: check-codegen
     2  on:
     3    push:
     4      branches:
     5        - master
     6        - release-*
     7    pull_request:
     8    workflow_dispatch:
     9  jobs:
    10    test:
    11      concurrency:
    12        group: codegen-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }}
    13        cancel-in-progress: true
    14      strategy:
    15        matrix:
    16          os: [ ubuntu-latest ]
    17          go-version: [1.21.x, 1.22.x]
    18      runs-on: ${{ matrix.os }}
    19      steps:
    20      - name: Checkout
    21        uses: actions/checkout@v3
    22  
    23      - name: Setup Go
    24        uses: actions/setup-go@v3
    25        with:
    26          go-version: ${{ matrix.go-version }}
    27  
    28      - name: Go Env
    29        run: |
    30          go env
    31  
    32      - name: Build
    33        run: |
    34          go install ./internal/cmd/gtrace
    35          go install go.uber.org/mock/mockgen@v0.4.0
    36  
    37      - name: Clean and re-generate *_gtrace.go files
    38        run: |
    39          rm -f ./trace/*_gtrace.go
    40          go generate ./trace
    41          go generate ./...
    42  
    43      - name: Check repository diff
    44        run: bash ./.github/scripts/check-work-copy-equals-to-committed.sh "code-generation not equal with committed"