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

feat: Use CircleCI instead of Travis for tests #220

Merged
merged 15 commits into from
Aug 18, 2020
Merged

Conversation

AzureMarker
Copy link
Contributor

@AzureMarker AzureMarker commented Aug 12, 2020

Travis is no longer used. The tests (including format check) run in parallel alongside the build and audit jobs. Currently, the tests take about 3-7 minutes (depending on cache availability), compared to 22 minutes in Travis.

Some of the changes:

  • We're now using a DynamoDB image (circleci/dynamodb) instead of starting one inside of the tests. Support for using an existing database has been added to the integration test suites (set AWS_LOCAL_DYNAMODB).
  • Because the database now persists between the two integration test suites, some issues related to message table rotation had to be fixed. Because of this and the fact that we don't do message table rotation anymore, it has been disabled during the tests and the associated tests are removed. More info in cf2167c.
  • Due to a different Python environment setup (no automatic virtualenv), git dependencies are no longer installed as editable. See also fix: Avoid installing dependencies as editable autopush#1431.

This also requires a change to the GitHub repo to change from requiring Travis checks to CircleCI.

Closes #148

We don't want to run its tests
By adding table rotation, the Rust autopush and autoendpoint code
select different message tables. Autopush (specifically autopush-common)
selects the last alphanumerically sorted message table, whereas
autoendpoint uses the exact table name it was given. When running the
Python autopush integration tests before the Rust autopush integration
tests, the rotated tables would be created and trigger this issue. Since
table rotation is no longer used, the tests have been removed/modified
to not create the month-specific rotation tables.

Also resets the AWS_LOCAL_DYNAMODB env variable if we started our own
DynamoDB instance.

Also fixes an issue where the create_router_table function did not check
if the table already exists. This is fixed by using the get_router_table
function.
jrconlin
jrconlin previously approved these changes Aug 13, 2020
Copy link
Member

@jrconlin jrconlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does make me wonder if we should change the default for allow_table_rotation...

.circleci/config.yml Show resolved Hide resolved
It contains includes requirements.txt by way of a `-r` command.
jrconlin
jrconlin previously approved these changes Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch integration tests to circle-ci
3 participants