63 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			63 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| language: rust
 | |
| rust:
 | |
|   - 1.36.0
 | |
|   - 1.37.0
 | |
|   # error on cfg(doctest)
 | |
|   # - 1.38.0
 | |
|   # - 1.39.0
 | |
|   - 1.40.0
 | |
|   - 1.41.0
 | |
|   - 1.42.0
 | |
|   - stable
 | |
|   - beta
 | |
|   - nightly
 | |
| matrix:
 | |
|   allow_failures:
 | |
|     - rust: nightly
 | |
| 
 | |
|   include:
 | |
|     # Rustfmt
 | |
|     - rust: stable
 | |
|       install:
 | |
|         - rustup component add rustfmt-preview
 | |
|       before_script:
 | |
|         - cargo fmt --version
 | |
|       script:
 | |
|         - cargo fmt -- --check
 | |
|       env:
 | |
|         - CHECK_FORMAT=true
 | |
| 
 | |
|     # Clippy
 | |
|     - rust: stable
 | |
|       install:
 | |
|         - rustup component add clippy-preview
 | |
|       script:
 | |
|         # Fail if clippy output contains "error:" or "warning:"
 | |
|         - cargo clippy 2>&1 | tee ./clippy.out && ! grep -qe  "error:\|warning:" ./clippy.out
 | |
|       env:
 | |
|         - CHECK_SYNTAX=true
 | |
| 
 | |
|     # Test coverage (with Tarpaulin)
 | |
|     - rust: stable
 | |
|       # To avoid "Error: EPERM: operation not permitted" error (see https://github.com/valery-barysok/session-file-store/issues/58)
 | |
|       sudo: true
 | |
|       install:
 | |
|         - RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin --force
 | |
|       script:
 | |
|         - cargo tarpaulin -v --ciserver travis-ci --coveralls $TRAVIS_JOB_ID
 | |
|       env:
 | |
|         - COVERAGE_MEASUREMENT=true
 | |
| 
 | |
| script:
 | |
|   - cargo test
 | |
| cache:
 | |
|   cargo: true
 | |
| before_cache:
 | |
|   # Travis can't cache files that are not readable by "others"
 | |
|   - chmod -R a+r $HOME/.cargo
 | |
| 
 | |
| addons:
 | |
|   apt:
 | |
|     packages:
 | |
|       - libssl-dev  # Required for tarpaulin
 |