-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
CI: use circleci #7603
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
Merged
Merged
CI: use circleci #7603
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
version: 2.1 | ||
|
||
default: &default | ||
steps: | ||
- checkout | ||
- run: git submodule sync | ||
- run: git submodule update --init | ||
- run: pip install --user tox | ||
- run: scripts/circle/install_node.sh | ||
- run: | ||
name: Add node to the path | ||
command: | | ||
echo 'export PATH=~/.nvm/versions/node/v${NODE_VERSION}/bin:$PATH' >> $BASH_ENV | ||
source $BASH_ENV | ||
- run: tox | ||
|
||
jobs: | ||
tests: | ||
<<: *default | ||
docker: | ||
- image: 'cimg/python:3.6' | ||
environment: | ||
TOXENV: py36,codecov | ||
TOX_POSARGS: '' | ||
- image: 'docker.elastic.co/elasticsearch/elasticsearch:6.8.12' | ||
name: search | ||
|
||
lint: | ||
<<: *default | ||
docker: | ||
- image: 'cimg/python:3.6' | ||
environment: | ||
TOXENV: lint | ||
|
||
migrations: | ||
<<: *default | ||
docker: | ||
- image: 'cimg/python:3.6' | ||
environment: | ||
TOXENV: migrations | ||
|
||
docs: | ||
<<: *default | ||
docker: | ||
- image: 'cimg/python:3.6' | ||
environment: | ||
TOXENV: docs | ||
|
||
docs-lint: | ||
<<: *default | ||
docker: | ||
- image: 'cimg/python:3.6' | ||
environment: | ||
TOXENV: docs-lint | ||
|
||
eslint: | ||
<<: *default | ||
docker: | ||
- image: 'cimg/python:3.6' | ||
environment: | ||
TOXENV: eslint | ||
NODE_VERSION: 10.17.0 | ||
|
||
workflows: | ||
version: 2 | ||
test: | ||
jobs: | ||
- lint | ||
- migrations | ||
- docs | ||
- docs-lint | ||
- eslint | ||
- tests |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we can speed up things by running all these in one job, otherwise circle will create a new container per each job and we can only have 5 concurrent jobs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't fully follow. Meaning just have 1 job that calls
tox
and it runs all 5 steps? I think we do that on the ad server: https://github.com/rtfd/ethical-ad-server/blob/ede6a0a0d2f9609f9e6426f59b4666219038a882/.circleci/config.yml#L27There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, just call
tox
with all except for the py36 environment (since that requires ES running, but maybe isn't that bad having ES running during all tests?). Also, splitting will give us the linter failures more quickly :DThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think 1 job per tox step is easier to parse while reading the errors. Right now we have 6 check notifications in this PR (1 per job) and you know immediately what (docs, lint, etc) failed without going to CircleCI.
Also, if we have 1 job per tox step, don't they run in parallel?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but then circle will be creating one container per each task, and with our current plan we can only have 5 concurrent jobs. So other PRs will need to wait till there is space available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can run
tox -e <env>
on separate steps so is more clear what failed