Skip to content
Snippets Groups Projects
Select Git revision
  • 6ea64d690ab8b989dc7782f5e97af1d2cbb9cd20
  • main default
  • tp2
  • tp1
  • tp3
  • tp3-correction
  • tp2-correction
  • tp1-correction
  • admins
9 results

.gitlab-ci.yml

Blame
  • Forked from an inaccessible project.
    user avatar
    Florentin Labelle authored
    a9c64f67
    History
    .gitlab-ci.yml 1.00 KiB
    image: python:3.10
    
    stages:
      - dependencies
      - lint
      - test
      - deploy
    
    download_dependencies:
      stage: dependencies
      before_script:
        - python -m venv .venv
        - source .venv/bin/activate
      script:
        - pip install -r requirements.txt
      artifacts:
        paths:
          - .venv
    
    pylint:
      stage: lint
      dependencies:
        - download_dependencies
      needs:
        - download_dependencies
      before_script:
        - source .venv/bin/activate
        - pip install pylint
      script:
        - pylint calculator --fail-on=error
    
    pytest:
      stage: test
      dependencies:
        - download_dependencies
      needs:
        - download_dependencies
      before_script:
        - source .venv/bin/activate
      script:
        - pytest calculator
    
    # deploy:
    #   stage: deploy
    #   needs:
    #     - pylint
    #     - pytest
    #   before_script:
    #     - apt-get update
    #     - apt-get install -y openssh-client sshpass
    #   script:
    #     - sshpass -p viazero ssh -o StrictHostKeyChecking=no viazero@<ip-de-ma-vm>
    #       "cd /var/www/cicd && git pull && sudo systemctl restart calculator"