Enable tests for --features nighly on travis
This commit is contained in:
parent
0f709d6edc
commit
654ab4c819
10
.travis.yml
10
.travis.yml
|
@ -16,23 +16,25 @@ jobs:
|
|||
python: "3.7"
|
||||
- name: Python 3.8
|
||||
python: "3.8"
|
||||
# Run clippy and rustfmt
|
||||
env: RUN_LINT=1
|
||||
- name: Python 3.9-dev
|
||||
python: "3.9-dev"
|
||||
- name: Minimum nightly
|
||||
- name: Nightly
|
||||
python: "3.7"
|
||||
# Keep this synced up with build.rs and ensure that the nightly version does have clippy available
|
||||
# https://static.rust-lang.org/dist/YYYY-MM-DD/clippy-nightly-x86_64-unknown-linux-gnu.tar.gz exists
|
||||
env: TRAVIS_RUST_VERSION=nightly-2020-01-21
|
||||
env: TRAVIS_RUST_VERSION=nightly FEATURES="nightly"
|
||||
- name: PyPy3.5 7.0 # Tested via anaconda PyPy (since travis's PyPy version is too old)
|
||||
python: "3.7"
|
||||
env: FEATURES="pypy" PATH="$PATH:/opt/anaconda/envs/pypy3/bin"
|
||||
allow_failures:
|
||||
- name: Nightly
|
||||
- python: 3.9-dev
|
||||
|
||||
env:
|
||||
global:
|
||||
- TRAVIS_RUST_VERSION=stable
|
||||
- RUST_BACKTRACE=1
|
||||
- RUN_LINT=0
|
||||
|
||||
before_install:
|
||||
- source ./ci/travis/setup.sh
|
||||
|
|
|
@ -7,7 +7,7 @@ set -e
|
|||
# Use profile=minimal here to skip installing clippy
|
||||
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=$TRAVIS_RUST_VERSION --profile=minimal -y
|
||||
export PATH=$PATH:$HOME/.cargo/bin
|
||||
if [ "$TRAVIS_JOB_NAME" = "Minimum nightly" ]; then
|
||||
if [[ $RUN_LINT == 1 ]]; then
|
||||
rustup component add clippy
|
||||
rustup component add rustfmt
|
||||
fi
|
||||
|
|
|
@ -10,7 +10,7 @@ else
|
|||
PYTHON_SYS_EXECUTABLE="/opt/anaconda/envs/pypy3/bin/pypy3" cargo build;
|
||||
fi
|
||||
|
||||
if [ "$TRAVIS_JOB_NAME" = "Minimum nightly" ]; then
|
||||
if [[ $RUN_LINT == 1 ]]; then
|
||||
pip install --pre black==19.3b0
|
||||
make lint
|
||||
fi
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![cfg_attr(nightly, feature(specialization))]
|
||||
#![cfg_attr(feature = "nightly", feature(specialization))]
|
||||
#![allow(clippy::missing_safety_doc)] // FIXME (#698)
|
||||
|
||||
//! Rust bindings to the Python interpreter.
|
||||
|
|
|
@ -7,11 +7,7 @@ fn test_compile_errors() {
|
|||
t.compile_fail("tests/ui/missing_clone.rs");
|
||||
t.compile_fail("tests/ui/reject_generics.rs");
|
||||
t.compile_fail("tests/ui/wrong_aspyref_lifetimes.rs");
|
||||
// Since the current minimum nightly(2020-01-20) has a different error message,
|
||||
// we skip this test.
|
||||
// TODO(kngwyu): Remove this `if` when we update minimum nightly.
|
||||
if option_env!("TRAVIS_JOB_NAME") != Some("Minimum nightly") {
|
||||
t.compile_fail("tests/ui/invalid_pymethod_names.rs");
|
||||
t.compile_fail("tests/ui/static_ref.rs");
|
||||
}
|
||||
t.compile_fail("tests/ui/static_ref.rs");
|
||||
#[cfg(not(feature = "nightly"))]
|
||||
t.compile_fail("tests/ui/invalid_pymethod_names.rs");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue