entgql: upgrade to 99designs/gqlgen@v0.17.62 and vektah/gqlparser/v2@… #2546
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2004-present Facebook All rights reserved. | |
# Use of this source code is governed by a BSD-style | |
# license that can be found in the LICENSE file. | |
name: Continuous Integration | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: 1.23 | |
- name: Run linters | |
uses: golangci/golangci-lint-action@v6.1.1 | |
with: | |
version: v1.62.2 | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: ['1.22', '1.23'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go }} | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/go/pkg/mod | |
~/.cache/go-build | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Run tests | |
run: go test -race ./... | |
generate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '1.23' | |
- uses: actions/cache@v3 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- uses: arduino/setup-protoc@v1 | |
with: | |
version: v3.19.4 | |
- name: Install protoc plugins | |
run: | | |
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28.0 | |
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2.0 | |
- name: Install protoc-gen-entgrpc | |
working-directory: entproto/cmd/protoc-gen-entgrpc | |
run: go install | |
- name: Install protoc-gen-ent | |
working-directory: entproto/cmd/protoc-gen-ent | |
run: go install | |
- name: Run go generate | |
run: go generate ./... | |
- name: Go mod tidy | |
run: go mod tidy | |
- name: Check generated files | |
run: | | |
status=$(git status --porcelain | cat) | |
if [ -n "$status" ]; then | |
echo "you need to run 'go generate ./...' and commit the changes" | |
echo "$status" | |
git --no-pager diff | |
exit 1 | |
fi |