Skip to content
Snippets Groups Projects
Select Git revision
  • f40a7e8cb70a747d020e6d4f032e50a5715e48b2
  • main default
2 results

.gitlab-ci.yml

Blame
  • .gitlab-ci.yml 6.20 KiB
    image: python:3.9
    
    # variables:
    #   MYSQL_DATABASE: $MYSQL_DATABASE
    #   MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD
    #   MYSQL_USER: $MYSQL_USER
    #   MYSQL_PASSWORD: $MYSQL_PASSWORD
    #   MYSQL_DATABASE: $MYSQL_DATABASE
    
    # services:
    #   - name: mysql:latest
    #     command: ["mysqld", "--authentication-policy=mysql_native_password"]
    #     alias: mysql
    
    # services:
    #   - name: mysql:latest
    #     command: ["mysqld", "--authentication-policy=mysql_native_password"]
    #     alias: mysql
    
    # variables:
    #   MYSQL_DATABASE: $MYSQL_DATABASE
    #   MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD
    
    # Host: mysql
    # User: $MYSQL_USER
    # Password: $MYSQL_PASSWORD
    # Database: $MYSQL_DATABASE
    
    # cache:
    #   paths:
    #     - .cache/pip
    #     - venv/
        # - env/
    
    # before_script:
      # - python --version  # For debugging
      # - pip install venv
      # - python3 -m venv /venv
      # - source /venv/bin/activate
    
    stages:
      - build
      - test
      - deploy
    
    workflow:
      rules:
        - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
        - if: $CI_COMMIT_BRANCH
    
    # include:
    #   - template: 'Code-Quality.gitlab-ci.yml'
    
    #######################################################################################################################################
    ####                                                                                                                               ####
    ####                                                 Install dependencies                                                          ####
    ####                                                                                                                               ####
    #######################################################################################################################################
    
    install:
      stage: build
      script:
        - python3 -m venv ./venv
        - source ./venv/bin/activate
        - pip install --upgrade pip && pip install pip-tools
        - pip install -r ./backend/requirements.txt
      artifacts:
        paths:
          - ./venv/
        expire_in: 30 mins