Verified Commit 2df0107a authored by Florian Forster's avatar Florian Forster
Browse files

ci: Add job for downloading the GraphQL schema.

parent 60870b54
Loading
Loading
Loading
Loading
+22 −2
Original line number Diff line number Diff line
@@ -157,11 +157,32 @@ verify-generated-code:
        exit 1;
      }

Download GraphQL schema:
  stage: test
  needs: []
  image: node:20-alpine
  script:
    - |
      if [ ! -f schema/gitlab.graphql ]; then
        mkdir schema
        npm install -g get-graphql-schema
        get-graphql-schema "${CI_API_GRAPHQL_URL}" --sdl >schema/gitlab.graphql
      fi
  cache:
    key: $CI_COMMIT_REF_SLUG
    paths:
      - schema/gitlab.graphql
    policy: pull-push
  artifacts:
    paths:
      - schema/gitlab.graphql

tests:unit:
  extends:
    - .go:versions
  stage: test
  needs: []
  needs:
    - Download GraphQL schema
  image: golang:$GOLANG_IMAGE_VERSION
  variables:
    # configure tooling versions
@@ -190,7 +211,6 @@ tests:unit:
        coverage_format: cobertura
    when: always


tests:integration:
  stage: test
  rules: