| 123456789101112131415161718192021222324252627282930 |
- language: python
- python:
- - 3.7
- before_install:
- - sudo apt remove *mysql*
- - sudo apt install software-properties-common gnupg-curl apt-transport-https
- - sudo apt-key adv --fetch-keys 'http://mariadb.org/mariadb_release_signing_key.asc'
- - sudo add-apt-repository 'deb [arch=amd64,arm64,i386,ppc64el] http://mariadb.mirrors.ovh.net/MariaDB/repo/10.5/ubuntu xenial main'
- - sudo apt update
- - sudo apt install mariadb-client mariadb-server mariadb-common libmariadb-dev libmariadb3
- - mysql --version
- - sudo mariadb-upgrade
- - sudo sed -i '/\[mysqld\]/ a event_scheduler=ON\nuserstat=1\nperformance_schema=ON' /etc/mysql/mariadb.conf.d/50-server.cnf
- - sudo systemctl restart mariadb
- - python --version
- install:
- - pip install -r requirements.txt
- - pip install -U codecov
- - pip install -U pytest-cov
- script:
- - sudo mariadb < extra/myanimebot-init.sql
- - sudo mariadb -e "CREATE USER IF NOT EXISTS 'myanimebot'@'localhost' IDENTIFIED BY 'myPassword'; GRANT ALL PRIVILEGES ON myanimebot.* TO 'myanimebot'@'localhost'; FLUSH PRIVILEGES;"
- - mkdir "logs"
- # Create conf
- - envsubst < myanimebot.example.conf > myanimebot.conf
- # Run tests
- - python -m pytest tests --cov=.
- after_success:
- # Submit coverage
- - bash <(curl -s https://codecov.io/bash)
|