Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrating travis -> circle #1685

Merged
merged 1 commit into from
Dec 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 154 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
# Use the latest 2.1 version of CircleCI pipeline process engine.
version: 2.1

orbs:
python: circleci/python@1.2

commands:
setup_dependencies:
description: "Install depenencies"
parameters:
after-deps:
description: "Install dependenceis"
type: steps
default: []
steps:
- run:
name: "Install open JDK"
command: sudo add-apt-repository -y ppa:openjdk-r/ppa
- run:
name: "Install qq"
command: sudo apt-get -qq update
- run:
name: "No install recommends for JDK"
command: sudo apt-get install -y openjdk-8-jdk --no-install-recommends
- run:
name: "Run Java Alternatives install for JDK"
command: sudo update-java-alternatives -s java-1.8.0-openjdk-amd64
- run:
name: "Run pip install setup tools and wheel"
command: pip install -U pip setuptools wheel
- run:
name: "Install Tox"
command: pip install -U tox==3.12.0
- run:
name: "Install Code Cov"
command: pip install -U codecov
- steps: << parameters.after-deps >>

# We want to make sure we run this only on master branch, release, or when we make tags
run_complex: &run_complex
filters:
branches:
only:
- (master|release-v.*)
tags:
only: /.*/

jobs:
Python38-Unit-Tests:
docker:
- image: cimg/python:3.8
environment:
TOXENV: coverage,doctest,type,check
TOX_INSTALL_DIR: .env
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64

steps:
- checkout
- setup_dependencies
- run:
name: "Run Tox"
command: tox

Python37-Unit-Tests:
docker:
- image: cimg/python:3.7
environment:
TOXENV: coverage,doctest,type,check
TOX_INSTALL_DIR: .env
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64

steps:
- checkout
- setup_dependencies
- run:
name: "Run Tox"
command: tox

Python36-Unit-Tests:
docker:
- image: cimg/python:3.6
environment:
TOXENV: coverage,doctest,type,check
TOX_INSTALL_DIR: .env
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64

steps:
- checkout
- setup_dependencies
- run:
name: "Run Tox"
command: tox
Python38-Integration-Tests:
docker:
- image: cimg/python:3.8
environment:
TOXENV: complex,type,check
TOX_INSTALL_DIR: .env
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64

steps:
- checkout
- setup_dependencies
- run:
name: "Run Tox"
command: tox

Python37-Integration-Tests:
docker:
- image: cimg/python:3.7
environment:
TOXENV: complex,spark,type,check
TOX_INSTALL_DIR: .env
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64

steps:
- checkout
- setup_dependencies
- run:
name: "Run Tox"
command: tox

Python36-Integration-Tests:
docker:
- image: cimg/python:3.6
environment:
TOXENV: coverage,complex,spark,doctest,type,check
TOX_INSTALL_DIR: .env
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64

steps:
- checkout
- setup_dependencies
- run:
name: "Run Tox"
command: tox

workflows:
version: 2

Interation-Tests:
jobs:
- Python38-Integration-Tests:
<<: *run_complex
- Python37-Integration-Tests:
<<: *run_complex
- Python36-Integration-Tests:
<<: *run_complex
Unit-Tests:
jobs:
- Python37-Unit-Tests
- Python36-Unit-Tests
- Python38-Unit-Tests

70 changes: 0 additions & 70 deletions .travis.yml

This file was deleted.

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

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