Skip to content

feat: upgrade go to 1.23 #799

feat: upgrade go to 1.23

feat: upgrade go to 1.23 #799

name: GraphQLMetrics CI
on:
pull_request:
paths:
- "graphqlmetrics/**/*"
- ".github/workflows/graphqlmetrics-ci.yaml"
concurrency:
group: ${{github.workflow}}-${{github.head_ref}}
cancel-in-progress: true
env:
CI: true
INT_TESTS: true
jobs:
build_test:
runs-on: ubuntu-latest
timeout-minutes: 10
services:
clickhouse:
# Docker Hub image
image: clickhouse/clickhouse-server:24
ports:
- "8123:8123"
- "9000:9000"
env:
CLICKHOUSE_DB: cosmo
CLICKHOUSE_USER: default
CLICKHOUSE_PASSWORD: changeme
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/go
with:
cache-dependency-path: graphqlmetrics/go.sum
- uses: ./.github/actions/go-mod-tidy
with:
working-directory: ./graphqlmetrics
- name: Install tools
run: make setup-build-tools
- name: Generate code
run: rm -rf graphqlmetrics/gen && buf generate --path proto/wg/cosmo/graphqlmetrics --path proto/wg/cosmo/common --template buf.graphqlmetrics.go.gen.yaml
- name: Check if git is not dirty after generating files
run: git diff --no-ext-diff --exit-code
- name: Install dependencies
working-directory: ./graphqlmetrics
run: go mod download
- uses: ./.github/actions/go-linter
with:
working-directory: ./graphqlmetrics
env-go-work: 'off'
- name: Test
working-directory: ./graphqlmetrics
run: make test
- name: Build
working-directory: ./graphqlmetrics
run: make build
build_push_image:
# This is a limitation of GitHub. Only organization members can push to GitHub Container Registry
# For now, we will disable the push to the GitHub Container Registry for external contributors
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-push-image
with:
docker_username: ${{secrets.DOCKER_USERNAME}}
docker_password: ${{secrets.DOCKER_PASSWORD}}
docker_context: graphqlmetrics
dockerfile: graphqlmetrics/Dockerfile
token: ${{secrets.GITHUB_TOKEN}}
image_name: graphqlmetrics
image_description: "Cosmo GraphQL Metrics Collector"