forked from RustPython/RustPython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
147 lines (138 loc) · 3.62 KB
/
.travis.yml
File metadata and controls
147 lines (138 loc) · 3.62 KB
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
before_cache: |
if command -v cargo; then
! command -v cargo-sweep && cargo install cargo-sweep
cargo sweep -i
cargo sweep -t 15
fi
matrix:
fast_finish: true
include:
- name: Run Rust tests
language: rust
rust: stable
cache: cargo
script:
- cargo build --verbose --all
- cargo test --verbose --all
env:
# Prevention of cache corruption.
# See: https://docs.travis-ci.com/user/caching/#caches-and-build-matrices
- JOBCACHE=1
# To test the snippets, we use Travis' Python environment (because
# installing rust ourselves is a lot easier than installing Python)
- name: Python test snippets
language: python
python: 3.6
cache:
- pip
- cargo
env:
- JOBCACHE=2
- TRAVIS_RUST_VERSION=stable
- CODE_COVERAGE=false
script: tests/.travis-runner.sh
- name: Check Rust code style with rustfmt
language: rust
rust: stable
cache: cargo
before_script:
- rustup component add rustfmt
script:
- cargo fmt --all -- --check
env:
- JOBCACHE=3
- name: Lint Rust code with clippy
language: rust
rust: stable
cache: cargo
before_script:
- rustup component add clippy
script:
- cargo clippy --all -- -Dwarnings
env:
- JOBCACHE=8
- name: Lint Python code with flake8
language: python
python: 3.6
cache: pip
env: JOBCACHE=9
install: pip install flake8
script:
flake8 . --count --exclude=./.*,./Lib,./vm/Lib --select=E9,F63,F7,F82
--show-source --statistics
- name: Publish documentation
language: rust
rust: stable
cache: cargo
script:
- cargo doc --no-deps --all
if: branch = release
env:
- JOBCACHE=4
deploy:
- provider: pages
repo: RustPython/website
target-branch: master
local-dir: target/doc
skip-cleanup: true
# Set in the settings page of your repository, as a secure variable
github-token: $WEBSITE_GITHUB_TOKEN
keep-history: true
on:
branch: release
- name: WASM online demo
language: rust
rust: stable
cache: cargo
install:
- nvm install node
# install wasm-pack
- curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
script:
- cd wasm/demo
- npm install
- npm run dist
if: branch = release
env:
- JOBCACHE=5
deploy:
- provider: pages
repo: RustPython/demo
target-branch: master
local-dir: wasm/demo/dist
skip-cleanup: true
# Set in the settings page of your repository, as a secure variable
github-token: $WEBSITE_GITHUB_TOKEN
keep-history: true
on:
branch: release
- name: Code Coverage
language: python
python: 3.6
cache:
- pip
- cargo
script:
- tests/.travis-runner.sh
# Only do code coverage on master via a cron job.
if: branch = master AND type = cron
env:
- JOBCACHE=6
- TRAVIS_RUST_VERSION=nightly
- CODE_COVERAGE=true
- name: Test WASM
language: python
python: 3.6
cache:
- pip
- cargo
addons:
firefox: latest
install:
- nvm install node
- pip install pipenv
script:
- wasm/tests/.travis-runner.sh
env:
- JOBCACHE=7
- TRAVIS_RUST_VERSION=stable