Skip to content

Commit b68db9f

Browse files
authored
Migrating travis -> circle (#1685)
## Description of proposed changes Replacing the CI system from Travis to Circle as we have seen issues running on Travis ## Related issue(s) N/A Fixes # (issue) N/A ## Test plan Having the CI tests run be Circle instead of Travis should test this ## Checklist Need help on these? Just ask! * [x] I have read the **CONTRIBUTING** document. * [x] I have updated the documentation accordingly. * [x] I have added tests to cover my changes. * [x] I have run `tox -e complex` and/or `tox -e spark` if appropriate. * [x] All new and existing tests passed.
1 parent 4a6d1a1 commit b68db9f

File tree

3 files changed

+156
-72
lines changed

3 files changed

+156
-72
lines changed

.circleci/config.yml

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
# Use the latest 2.1 version of CircleCI pipeline process engine.
2+
version: 2.1
3+
4+
orbs:
5+
python: circleci/[email protected]
6+
7+
commands:
8+
setup_dependencies:
9+
description: "Install depenencies"
10+
parameters:
11+
after-deps:
12+
description: "Install dependenceis"
13+
type: steps
14+
default: []
15+
steps:
16+
- run:
17+
name: "Install open JDK"
18+
command: sudo add-apt-repository -y ppa:openjdk-r/ppa
19+
- run:
20+
name: "Install qq"
21+
command: sudo apt-get -qq update
22+
- run:
23+
name: "No install recommends for JDK"
24+
command: sudo apt-get install -y openjdk-8-jdk --no-install-recommends
25+
- run:
26+
name: "Run Java Alternatives install for JDK"
27+
command: sudo update-java-alternatives -s java-1.8.0-openjdk-amd64
28+
- run:
29+
name: "Run pip install setup tools and wheel"
30+
command: pip install -U pip setuptools wheel
31+
- run:
32+
name: "Install Tox"
33+
command: pip install -U tox==3.12.0
34+
- run:
35+
name: "Install Code Cov"
36+
command: pip install -U codecov
37+
- steps: << parameters.after-deps >>
38+
39+
# We want to make sure we run this only on master branch, release, or when we make tags
40+
run_complex: &run_complex
41+
filters:
42+
branches:
43+
only:
44+
- (master|release-v.*)
45+
tags:
46+
only: /.*/
47+
48+
jobs:
49+
Python38-Unit-Tests:
50+
docker:
51+
- image: cimg/python:3.8
52+
environment:
53+
TOXENV: coverage,doctest,type,check
54+
TOX_INSTALL_DIR: .env
55+
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
56+
57+
steps:
58+
- checkout
59+
- setup_dependencies
60+
- run:
61+
name: "Run Tox"
62+
command: tox
63+
64+
Python37-Unit-Tests:
65+
docker:
66+
- image: cimg/python:3.7
67+
environment:
68+
TOXENV: coverage,doctest,type,check
69+
TOX_INSTALL_DIR: .env
70+
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
71+
72+
steps:
73+
- checkout
74+
- setup_dependencies
75+
- run:
76+
name: "Run Tox"
77+
command: tox
78+
79+
Python36-Unit-Tests:
80+
docker:
81+
- image: cimg/python:3.6
82+
environment:
83+
TOXENV: coverage,doctest,type,check
84+
TOX_INSTALL_DIR: .env
85+
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
86+
87+
steps:
88+
- checkout
89+
- setup_dependencies
90+
- run:
91+
name: "Run Tox"
92+
command: tox
93+
Python38-Integration-Tests:
94+
docker:
95+
- image: cimg/python:3.8
96+
environment:
97+
TOXENV: complex,type,check
98+
TOX_INSTALL_DIR: .env
99+
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
100+
101+
steps:
102+
- checkout
103+
- setup_dependencies
104+
- run:
105+
name: "Run Tox"
106+
command: tox
107+
108+
Python37-Integration-Tests:
109+
docker:
110+
- image: cimg/python:3.7
111+
environment:
112+
TOXENV: complex,spark,type,check
113+
TOX_INSTALL_DIR: .env
114+
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
115+
116+
steps:
117+
- checkout
118+
- setup_dependencies
119+
- run:
120+
name: "Run Tox"
121+
command: tox
122+
123+
Python36-Integration-Tests:
124+
docker:
125+
- image: cimg/python:3.6
126+
environment:
127+
TOXENV: coverage,complex,spark,doctest,type,check
128+
TOX_INSTALL_DIR: .env
129+
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
130+
131+
steps:
132+
- checkout
133+
- setup_dependencies
134+
- run:
135+
name: "Run Tox"
136+
command: tox
137+
138+
workflows:
139+
version: 2
140+
141+
Interation-Tests:
142+
jobs:
143+
- Python38-Integration-Tests:
144+
<<: *run_complex
145+
- Python37-Integration-Tests:
146+
<<: *run_complex
147+
- Python36-Integration-Tests:
148+
<<: *run_complex
149+
Unit-Tests:
150+
jobs:
151+
- Python37-Unit-Tests
152+
- Python36-Unit-Tests
153+
- Python38-Unit-Tests
154+

.travis.yml

Lines changed: 0 additions & 70 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Any test that runs longer than half a second should be marked with the
112112
`@pytest.mark.complex` decorator.
113113
Typically, these will be integration tests or tests that verify complex
114114
properties like model convergence.
115-
We exclude long-running tests from the default `tox` and Travis builds
115+
We exclude long-running tests from the default `tox` and Circle CI builds
116116
on non-master and non-release branches to keep things moving fast.
117117
If you're touching areas of the code that could break a long-running test,
118118
you should include the results of `tox -e complex` in the PR's test plan.
@@ -124,7 +124,7 @@ To see the durations of the 10 longest-running tests, run
124124

125125
PySpark tests are invoked separately from the rest since they require
126126
installing Java and the large PySpark package.
127-
They are executed on Travis, but not by default for a local `tox` command.
127+
They are executed on Circle CI, but not by default for a local `tox` command.
128128
If you're making changes to Spark-based operators, make sure you have
129129
Java 8 installed locally and then run `tox -e spark`.
130130
If you add a test that imports PySpark mark it with the

0 commit comments

Comments
 (0)