image: alpine

stages:
  - test

job:test:unit:
  before_script:
   - echo "Install Dependancies"
   - sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories
   - apk update
   - apk add python3
   - apk add py-pip
   - pip install pytest mysql-connector-python get_docker_secret docker flake8
   - echo "Start Tests"
  script:
   - cd tests
   - pytest -v
   - cd ..
   - flake8 --max-line-length=120 softwares/server/*
  after_script:
   - echo "Tests have been done"