forked from rust-lang/crates.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
85 lines (77 loc) · 2.06 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
language: rust
sudo: required
dist: xenial
branches:
only:
- auto
- try
- master
cache:
cargo: true
directories:
- $HOME/.npm
before_cache: script/ci/prune-cache.sh
env:
global:
- RUST_BACKTRACE=1
- JOBS=1 # See https://git.io/vdao3 for details.
- DATABASE_URL=postgres://postgres:@localhost/cargo_registry_test
- TEST_DATABASE_URL=postgres://postgres:@localhost/cargo_registry_test
- CARGO_INCREMENTAL=0
- PERCY_PARALLEL_TOTAL=2
# Percy secrets are included here to enable Percy's GitHub integration
# on community-submitted PRs
- PERCY_TOKEN=0d8707a02b19aebbec79bb0bf302b8d2fa95edb33169cfe41b084289596670b1
- PERCY_PROJECT=crates-io/crates.io
- PGPORT=5433
- PATH=$HOME/.cargo/bin:$PATH
- RUSTFLAGS="-C debuginfo=0 -D warnings"
- MALLOC_CONF=background_thread:true,abort_conf:true,abort:true,junk:true
install:
- sudo cp /etc/postgresql/10/main/pg_hba.conf /etc/postgresql/11/main/pg_hba.conf
- sudo systemctl restart postgresql@11-main
- script/ci/cargo-clean-on-new-rustc-version.sh
- which diesel || cargo install diesel_cli --vers `cat .diesel_version` --no-default-features --features postgres
before_script:
- diesel database setup --locked-schema
addons:
chrome: stable
postgresql: "11"
apt:
packages:
- postgresql-11
- postgresql-client-11
matrix:
fast_finish: true
allow_failures:
- rust: nightly
include:
- name: Backend
rust: stable
before_install:
- rustup component add rustfmt-preview
- rustup component add clippy-preview
script:
- cargo fmt -- --check
- cargo clippy --all-targets --all-features --all
- cargo test
- name: Frontend
language: node_js
node_js: 12
install:
- npm ci
before_script: skip
script:
- npm run lint:hbs
- npm run lint:js
- npm run lint:deps
- npm test
- rust: beta
script:
- cargo test
- rust: nightly
script:
- cargo test
notifications:
email:
on_success: never