mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[CI] Added support for conditional builds and env vars (#1320)
* Changed travis deploy scheme * Fixed indentation * Okay NOW I did fix indentation (hopefully) * Conditional deployment tests * Fixed a 7:35 AM typo * Fixed builds not building.
This commit is contained in:
parent
0593bb9c53
commit
21de95e0a6
64
.travis.yml
64
.travis.yml
@ -1,42 +1,50 @@
|
|||||||
dist: trusty
|
dist: trusty
|
||||||
language: python
|
language: python
|
||||||
|
cache: pip
|
||||||
|
notifications:
|
||||||
|
email: false
|
||||||
|
|
||||||
python:
|
python:
|
||||||
- 3.5.3
|
- 3.5.3
|
||||||
- 3.6.1
|
- 3.6.1
|
||||||
install:
|
install:
|
||||||
- echo "pytest>3" >> requirements.txt
|
- echo "pytest>3" >> requirements.txt
|
||||||
- echo "pytest-asyncio" >> requirements.txt
|
- echo "pytest-asyncio" >> requirements.txt
|
||||||
- echo "git+https://github.com/Rapptz/discord.py.git@rewrite#egg=discord.py[voice]"
|
- echo "git+https://github.com/Rapptz/discord.py.git@rewrite#egg=discord.py[voice]" >> requirements.txt
|
||||||
>> requirements.txt
|
|
||||||
- pip install -r requirements.txt
|
- pip install -r requirements.txt
|
||||||
- pip install .
|
- pip install .
|
||||||
script:
|
script:
|
||||||
- python -m compileall ./redbot/cogs
|
- python -m compileall ./redbot/cogs
|
||||||
- python -m pytest
|
- python -m pytest
|
||||||
before_deploy:
|
|
||||||
- curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
|
jobs:
|
||||||
- echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
|
include:
|
||||||
- sudo apt-get update -qq
|
- stage: Deployment
|
||||||
- sudo apt-get install -y crowdin
|
if: tag IS present
|
||||||
deploy:
|
|
||||||
- provider: pypi
|
|
||||||
user: Red-DiscordBot
|
|
||||||
password:
|
|
||||||
secure: Ty9vYnd/wCuQkVC/OsS4E2jT9LVDVfzsFrQc4U2hMYcTJnYbl/3omyObdCWCOBC40vUDkVHAQU8ULHzoCA+2KX9Ds/7/P5zCumAA0uJRR9Smw7OlRzSMxJI+/lGq4CwXKzxDZKuo5rsxXEbW5qmYjtO8Mk6KuLkvieb1vyr2DcqWEFzg/7TZNDfD1oP8et8ITQ26lLP1dtQx/jlAiIBzgK9wziuwj1Divb9A///VsGz43N8maZ+jfsDjYqrfUVWTy3ar7JPUplletenYCR1PmQ5C46XfV0kitKd1aITJ48YPAKyYgKy8AIT+Uz1JArTnqdzLSFRNELS57qS00lzgllbteCyWQ8Uzy0Zpxb/5DDH8/mL1n0MyJrF8qjZd2hLNAXg3z/k9bGXeiMLGwoxRlGXkL2XpiVgI93UKKyVyooGNMgPTc/QdSc7krjAWcOtX/HgLR34jxeLPFEdzJNAFIimfDD8N+XTFcNBw6EvOYm/n5MXkckNoX/G+ThNobHZ7VKSASltZ9zBRAJ2dDh35G3CYmVEk33U77RKbL9le/Za9QVBcAO8i6rqVGYkdO7thHHKHc/1CB1jNnjsFSDt0bURtNfAqfwKCurQC8487zbEzT+2fog3Wygv7g3cklaRg4guY8UjZuFWStYGqbroTsOCd9ATNqeO5B13pNhllSzU=
|
|
||||||
skip_cleanup: true
|
|
||||||
on:
|
|
||||||
repo: Cog-Creators/Red-DiscordBot
|
|
||||||
branch: V3/develop
|
|
||||||
python: 3.5.3
|
python: 3.5.3
|
||||||
tags: true
|
env:
|
||||||
- provider: script
|
- DEPLOYING=true
|
||||||
script: python3 ./generate_strings.py
|
before_deployment:
|
||||||
skip_cleanup: true
|
- curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
|
||||||
on:
|
- echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
|
||||||
repo: Cog-Creators/Red-DiscordBot
|
- sudo apt-get update -qq
|
||||||
branch: V3/develop
|
- sudo apt-get install -y crowdin
|
||||||
python: 3.5.3
|
deploy:
|
||||||
tags: true
|
- provider: pypi
|
||||||
cache: pip
|
user: Red-DiscordBot
|
||||||
notifications:
|
password:
|
||||||
email: false
|
secure: Ty9vYnd/wCuQkVC/OsS4E2jT9LVDVfzsFrQc4U2hMYcTJnYbl/3omyObdCWCOBC40vUDkVHAQU8ULHzoCA+2KX9Ds/7/P5zCumAA0uJRR9Smw7OlRzSMxJI+/lGq4CwXKzxDZKuo5rsxXEbW5qmYjtO8Mk6KuLkvieb1vyr2DcqWEFzg/7TZNDfD1oP8et8ITQ26lLP1dtQx/jlAiIBzgK9wziuwj1Divb9A///VsGz43N8maZ+jfsDjYqrfUVWTy3ar7JPUplletenYCR1PmQ5C46XfV0kitKd1aITJ48YPAKyYgKy8AIT+Uz1JArTnqdzLSFRNELS57qS00lzgllbteCyWQ8Uzy0Zpxb/5DDH8/mL1n0MyJrF8qjZd2hLNAXg3z/k9bGXeiMLGwoxRlGXkL2XpiVgI93UKKyVyooGNMgPTc/QdSc7krjAWcOtX/HgLR34jxeLPFEdzJNAFIimfDD8N+XTFcNBw6EvOYm/n5MXkckNoX/G+ThNobHZ7VKSASltZ9zBRAJ2dDh35G3CYmVEk33U77RKbL9le/Za9QVBcAO8i6rqVGYkdO7thHHKHc/1CB1jNnjsFSDt0bURtNfAqfwKCurQC8487zbEzT+2fog3Wygv7g3cklaRg4guY8UjZuFWStYGqbroTsOCd9ATNqeO5B13pNhllSzU=
|
||||||
|
skip_cleanup: true
|
||||||
|
on:
|
||||||
|
repo: Cog-Creators/Red-DiscordBot
|
||||||
|
branch: V3/develop
|
||||||
|
python: 3.5.3
|
||||||
|
tags: true
|
||||||
|
- provider: script
|
||||||
|
script: python3 ./generate_strings.py
|
||||||
|
skip_cleanup: true
|
||||||
|
on:
|
||||||
|
repo: Cog-Creators/Red-DiscordBot
|
||||||
|
branch: V3/develop
|
||||||
|
python: 3.5.3
|
||||||
|
tags: true
|
||||||
|
|||||||
3
setup.py
3
setup.py
@ -8,6 +8,7 @@ import sys
|
|||||||
from setuptools import find_packages
|
from setuptools import find_packages
|
||||||
|
|
||||||
IS_TRAVIS = 'TRAVIS' in os.environ
|
IS_TRAVIS = 'TRAVIS' in os.environ
|
||||||
|
IS_DEPLOYING = 'DEPLOYING' in os.environ
|
||||||
|
|
||||||
dep_links = ['https://github.com/Rapptz/discord.py/tarball/rewrite#egg=discord.py-1.0']
|
dep_links = ['https://github.com/Rapptz/discord.py/tarball/rewrite#egg=discord.py-1.0']
|
||||||
if IS_TRAVIS:
|
if IS_TRAVIS:
|
||||||
@ -22,7 +23,7 @@ def get_package_list():
|
|||||||
def get_requirements():
|
def get_requirements():
|
||||||
with open('requirements.txt') as f:
|
with open('requirements.txt') as f:
|
||||||
requirements = f.read().splitlines()
|
requirements = f.read().splitlines()
|
||||||
if IS_TRAVIS:
|
if IS_TRAVIS and not IS_DEPLOYING:
|
||||||
requirements.remove('git+https://github.com/Rapptz/discord.py.git@rewrite#egg=discord.py[voice]')
|
requirements.remove('git+https://github.com/Rapptz/discord.py.git@rewrite#egg=discord.py[voice]')
|
||||||
else:
|
else:
|
||||||
requirements.append('discord.py>=1.0.0a0') # Because RTD
|
requirements.append('discord.py>=1.0.0a0') # Because RTD
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user