Commit d44cfbd7 authored by Adam Parák's avatar Adam Parák 💬 Committed by Marek Veselý
Browse files

Introduce Turbo into the pipeline

parent f62946cc
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -14,6 +14,9 @@ shared/lib
graphql/lib
.swc

# Turbo
.turbo

# Yarn
!.yarn/releases/*
!.yarn/
@@ -27,3 +30,7 @@ docker/live-env/data/**

# workspace settings
.vscode/settings.json
vite.config.*.timestamp*
vitest.config.*.timestamp*

gl-codereport.json
 No newline at end of file
+49 −39
Original line number Diff line number Diff line
@@ -3,75 +3,86 @@ stages:
  - create

variables:
  ID: "${CI_COMMIT_SHORT_SHA}"
  ID: '${CI_COMMIT_SHORT_SHA}'
  GIT_SUBMODULE_STRATEGY: recursive
  CI_REGISTRY_IMAGE: frontend
  CI_REGISTRY: gitlab.fi.muni.cz:5050/inject/container-registry/$CI_REGISTRY_IMAGE
  IMAGE_TAG: "$CI_REGISTRY:$CI_COMMIT_TAG"
  IMAGE_LATEST: "$CI_REGISTRY:latest"
  IMAGE_TAG: '$CI_REGISTRY:$CI_COMMIT_TAG'
  IMAGE_LATEST: '$CI_REGISTRY:latest'
  DOCKER_HOST: tcp://docker:2375
  DOCKER_DRIVER: overlay2
  DOCKER_TLS_CERTDIR: ''


default:
  tags:
    - inject

lint-test-job:
  cache:
  key: yarn-cache
    - key: yarn-cache-$CI_COMMIT_BRANCH
      fallback_keys:
        - yarn-cache-main
      paths:
  - ".yarn"


lint-test-job:
        - '.yarn'
    - key: turbo-cache-$CI_COMMIT_BRANCH
      fallback_keys:
        - turbo-cache-main
      paths:
        - '.turbo'
        - 'frontend/.turbo'
        - 'graphql/.turbo'
        - 'shared/.turbo'
        - 'eslint-config/.turbo'
        - 'prettier-config/.turbo'
  image: node:20
  stage: test
  script:
  - yarn lint
    - yarn eslint-gitlab
    - find . -maxdepth 2 -name "gl-codereport.json" -exec jq -s 'add' {} + > gl-codereport.json
  before_script:
    - corepack enable
    - apt-get update && apt-get install -y jq
    - yarn
  artifacts:
    reports:
      codequality: gl-codequality.json

      codequality: './gl-codereport.json'

tsc-test-job:
  cache:
    - key: yarn-cache-$CI_COMMIT_BRANCH
      fallback_keys:
        - yarn-cache-main
      paths:
        - '.yarn'
  image: node:20
  stage: test
  script:
  - yarn workspace @inject/frontend tsc -b
  - yarn workspace @inject/frontend tsc
    - yarn check-types
  before_script:
    - corepack enable
    - yarn


sast:
  variables:
    SAST_EXCLUDED_PATHS: backend
  allow_failure: true


dependency_scanning:
  variables:
    DS_EXCLUDED_PATHS: backend
  allow_failure: true


secret_detection:
  image: registry.gitlab.com/security-products/secrets:6
  allow_failure: false


create-image:
  image: docker:20.10.16
  services:
    - name: docker:20.10.16-dind
      alias: docker
      command:
    - "--tls=false"
        - '--tls=false'
  stage: create
  rules:
    - if: $CI_COMMIT_TAG
@@ -86,7 +97,6 @@ create-image:
    - docker build -t $IMAGE_TAG ${CI_PROJECT_DIR}
    - docker push $IMAGE_TAG


create-tag:
  image: python:3.8-buster
  stage: create
+8 −1
Original line number Diff line number Diff line
router.ts
dist
lib
node_modules
router.ts
graphql/schema.json
graphql/schema.graphql
graphql/schema.remote.json
graphql/schema-urql.ts
graphql/urql/cache-typing.ts
graphql/graphql-cache.d.ts
graphql/graphql-env.d.ts
graphql/fragment-types.ts
graphql/urql/subschemas/*Type.ts
.yarn/*
backend/*
*.md
 No newline at end of file
+1 −12
Original line number Diff line number Diff line
/** @type {import("prettier").Options} */
module.exports = {
  trailingComma: 'es5',
  printWidth: 80,
  singleQuote: true,
  semi: false,
  tabWidth: 2,
  useTabs: false,
  bracketSpacing: true,
  bracketSameLine: false,
  jsxSingleQuote: true,
  arrowParens: 'avoid',
  endOfLine: 'auto',
  plugins: [require.resolve('prettier-plugin-organize-imports')],
  ...require('@inject/prettier-config'),
}
+0 −71

File deleted.

Preview size limit exceeded, changes collapsed.

Loading