mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-19 09:26:06 -05:00
[V3] Add tox (#1641)
* Configure tox environments for install, dev install and docs build * Configure Travis to run tox * Use 3.5.1 since it's our minimum supported version * Bump lower travis build version to 3.5.2 Turns out a dependency is incompatible with 3.5.1. * Modify Travis config to install from pipenv * Try without skipping the lock * Try without pip cache * D the dev install with pipenv * See if adding the pip cache back in breaks * Remove the development installation It doesn't really make any sense considering we already should be installed in develop mode, as does Travis. * Oops, tox should go under dev packages * Do black --check with tox * Uncache pip again... * Try a build matrix, and try ignoring virtualenvs * Activate pipenv shell on travis * Try installing prereleases * Try the build matrix like this * Try exclusion * Upgrade pip * Try this environment marker * Back to stages... * Try run over shell * Try skipping the lock again * This'll be faster but probably ignore 3.5 Because Travis * Just manually list sources for black to check * Magic? * What if I told you... That this worked perfectly on Tobotimus/Red-DiscordBot@test_travis_matrix * It couldn't possibly be this easy * Let's add some comments to be nice * Let's change back to trusty just in case the stages fuck up * Add another comment because why not * Let's try caching pip one more time * We don't need to whitelist these
This commit is contained in:
34
.travis.yml
34
.travis.yml
@@ -5,21 +5,35 @@ notifications:
|
||||
email: false
|
||||
|
||||
python:
|
||||
- 3.5.3
|
||||
- 3.6.1
|
||||
- 3.6.5
|
||||
- 3.5.2
|
||||
env:
|
||||
global:
|
||||
PIPENV_IGNORE_VIRTUALENVS=1
|
||||
matrix:
|
||||
# This is the environment for the main test jobs.
|
||||
# This will run for all above specified versions of python
|
||||
TOXENV=py
|
||||
|
||||
install:
|
||||
- echo "git+https://github.com/Rapptz/discord.py.git@rewrite#egg=discord.py[voice]" >> requirements.txt
|
||||
- pip install -r requirements.txt
|
||||
- pip install .[test]
|
||||
- pip install --upgrade pip pipenv
|
||||
- pipenv install --skip-lock --dev
|
||||
|
||||
script:
|
||||
- python -m compileall ./redbot/cogs
|
||||
- python -m pytest
|
||||
- pipenv run tox
|
||||
|
||||
jobs:
|
||||
include:
|
||||
# These jobs occur in parallel with the main test job
|
||||
- python: 3.6.5
|
||||
env: TOXENV=docs
|
||||
- python: 3.6.5
|
||||
env: TOXENV=style
|
||||
|
||||
# These jobs only occur on tag creation for V3/develop if the prior ones succeed
|
||||
- stage: PyPi Deployment
|
||||
if: tag IS present
|
||||
python: 3.5.3
|
||||
python: 3.6.5
|
||||
env:
|
||||
- DEPLOYING=true
|
||||
deploy:
|
||||
@@ -35,10 +49,10 @@ jobs:
|
||||
tags: true
|
||||
- stage: Crowdin Deployment
|
||||
if: tag IS present
|
||||
python: 3.5.3
|
||||
python: 3.6.5
|
||||
env:
|
||||
- DEPLOYING=true
|
||||
before_deployment:
|
||||
before_deploy:
|
||||
- curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
|
||||
- echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
|
||||
- sudo apt-get update -qq
|
||||
|
||||
Reference in New Issue
Block a user