Update .travis.yml to use python3 for flake8, check_rst and coverage

This commit is contained in:
Valentin Samir 2020-01-01 12:14:44 +01:00
parent 4aba254975
commit 781e516769
2 changed files with 10 additions and 6 deletions

View File

@ -1,9 +1,9 @@
language: python
matrix:
include:
- python: "2.7"
- python: "3.7"
env: TOX_ENV=flake8
- python: "2.7"
- python: "3.7"
env: TOX_ENV=check_rst
- python: "2.7"
env: TOX_ENV=py27-django111
@ -19,7 +19,7 @@ matrix:
env: TOX_ENV=py35-django21
- python: "3.6"
env: TOX_ENV=py36-django21
- python: "2.7"
- python: "3.7"
env: TOX_ENV=coverage
cache:
directories:

View File

@ -1,5 +1,7 @@
#!/bin/bash
BASEDIR="$1"
set -x
set -e
BASEDIR="$(realpath "$1")"
PROJECT_NAME="$2"
TITLE="Coverage report of $PROJECT_NAME"
@ -31,7 +33,7 @@ fi
VENV="$(mktemp -d)"
HTMLREPORT="$(mktemp -d)"
virtualenv "$VENV"
virtualenv -p python3 "$VENV"
"$VENV/bin/pip" install coverage
"$VENV/bin/coverage" html --title "$TITLE" --directory "$HTMLREPORT"
rm -rf "$VENV"
@ -43,12 +45,14 @@ cd "$BASEDIR"
rm -rf "$HTMLREPORT"
set +x
echo "curl https://badges.genua.fr/coverage/ ..."
curl https://badges.genua.fr/coverage/ \
-F "secret=$COVERAGE_TOKEN" \
-F "tar=@$BASEDIR/coverage.tar.gz" \
-F "project=$PROJECT_NAME" \
-F "branch=$BRANCH"
set -x
rm "$BASEDIR/coverage.tar.gz"