Merge pull request #1384 from epfl-scitas/qa/drop_flake8_python26
qa : no flake8 on python 2.6, coveralls only on python 2.7
This commit is contained in:
commit
500218df80
2 changed files with 34 additions and 11 deletions
25
.travis.yml
25
.travis.yml
|
@ -1,7 +1,17 @@
|
||||||
language: python
|
language: python
|
||||||
|
|
||||||
python:
|
python:
|
||||||
- "2.6"
|
- "2.6"
|
||||||
- "2.7"
|
- "2.7"
|
||||||
|
env:
|
||||||
|
- TEST_TYPE=unit
|
||||||
|
- TEST_TYPE=flake8
|
||||||
|
|
||||||
|
# Exclude flake8 from python 2.6
|
||||||
|
matrix:
|
||||||
|
exclude:
|
||||||
|
- python: "2.6"
|
||||||
|
env: TEST_TYPE=flake8
|
||||||
|
|
||||||
# Use new Travis infrastructure (Docker can't sudo yet)
|
# Use new Travis infrastructure (Docker can't sudo yet)
|
||||||
sudo: false
|
sudo: false
|
||||||
|
@ -20,20 +30,13 @@ before_install:
|
||||||
- git fetch origin develop:develop
|
- git fetch origin develop:develop
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# Regular spack setup and tests
|
# Run unit tests with code coverage plus install libdwarf
|
||||||
- . share/spack/setup-env.sh
|
- 'if [ "$TEST_TYPE" = "unit" ]; then share/spack/qa/run-unit-tests; fi'
|
||||||
- spack compilers
|
|
||||||
- spack config get compilers
|
|
||||||
- spack install -v libdwarf
|
|
||||||
|
|
||||||
# Run unit tests with code coverage
|
|
||||||
- coverage run bin/spack test
|
|
||||||
|
|
||||||
# Run flake8 code style checks.
|
# Run flake8 code style checks.
|
||||||
- share/spack/qa/run-flake8
|
- 'if [ "$TEST_TYPE" = "flake8" ]; then share/spack/qa/run-flake8; fi'
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- coveralls
|
- 'if [ "$TEST_TYPE" = "unit" ] && [ "$TRAVIS_PYTHON_VERSION" = "2.7" ]; then coveralls; fi'
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email:
|
email:
|
||||||
|
|
20
share/spack/qa/run-unit-tests
Executable file
20
share/spack/qa/run-unit-tests
Executable file
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# This script runs Spack unit tests.
|
||||||
|
#
|
||||||
|
# It should be executed from the top-level directory of the repo,
|
||||||
|
# e.g.:
|
||||||
|
#
|
||||||
|
# share/spack/qa/run-unit-tests
|
||||||
|
#
|
||||||
|
# To run it, you'll need to have the Python coverage installed locally.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Regular spack setup and tests
|
||||||
|
. ./share/spack/setup-env.sh
|
||||||
|
spack compilers
|
||||||
|
spack config get compilers
|
||||||
|
spack install -v libdwarf
|
||||||
|
|
||||||
|
# Run unit tests with code coverage
|
||||||
|
coverage run bin/spack test
|
Loading…
Reference in a new issue