Skip to content
This repository has been archived by the owner on Dec 16, 2019. It is now read-only.

Testing Workflow | Restructure repositories #268

Closed
blankdots opened this issue Mar 22, 2018 · 5 comments
Closed

Testing Workflow | Restructure repositories #268

blankdots opened this issue Mar 22, 2018 · 5 comments
Assignees
Milestone

Comments

@blankdots
Copy link

In order to streamline the development, testing and build workflow we are aiming to split the LocalEGA repository as follows:

  • add unit tests in python as LocalEGA implementation, automating if possible with https://tox.readthedocs.io/en/latest/
  • move deployment/ folder along with integration tests to another repo e.g. LocalEGA-deploy
  • in the LocalEGA-deploy replace fake Eureka server with the Spring Eureka version

What we are aiming to achieve is (assuming tests pass):

                                       Trigger
LocalEGA +-------> UnitTests +-------> Integration Tests
change             Travis              LocalEGA-deploy

Travis resources:

@silverdaz silverdaz added this to the Sprint 26 milestone Mar 23, 2018
@blankdots blankdots self-assigned this Mar 27, 2018
@blankdots
Copy link
Author

working .travis.yml config:

language: python

python: 3.6

services: docker

stages:
    # unit tests will run on push and PR
  - name: unit_tests
    if: type IN (push, pull_request)
    # integration tests will run on push and PR
  - name: integration_tests
    if: type IN (pull_request)

jobs:
  include:
    - stage: unit_tests
      python: 3.6
      before_script:
        - pip install tox-travis
      script: tox
    - stage: integration_tests
      before_script:
        - git clone https://github.com/repo/LocalEGA-deploy.git
        - cd LocalEGA-deploy && mkdir -p LocalEGA && cp -r ../lega LocalEGA/
        - cd docker
        - make bootstrap
        - sudo chown -R travis private
        - docker network create cega
        - docker-compose up -d ${DOCKER_CONTAINERS}
        - docker-compose ps
      script:
        - sleep 10
        - cd ../tests
        - mvn test -B

notifications:
  email: false

@dtitov
Copy link

dtitov commented Mar 28, 2018

Looks good!

@silverdaz
Copy link
Contributor

Is that on the LocalEGA repo, or on the new LocalEGA-deploy repo?
If it is the LocalEGA-deploy, then I don't understand the git clone command.

In my understanding the LocalEGA repo would have a rather minimal .travis file that runs the tox tests. The LocalEGA-deploy would have a more complex .travis, that pulls the LocalEGA repo, and connects everything together (including bootstrapping). It looks like the one above, but then I do not understand the git clone, since it is what travis is going to run, but with a given commit.

Help me understand, please.
(Of course, I prefer a video chat, you know it 😉 )

@dtitov
Copy link

dtitov commented Mar 28, 2018

All tests should be run on the main repo, otherwise, we can't have PR hooks (blocked PRs if tests fail). So it's for LocalEGA repo.

@dtitov
Copy link

dtitov commented Mar 28, 2018

BTW, @blankdots, don't forget Slack integration, as we have it currently.

blankdots added a commit that referenced this issue Mar 29, 2018
viklund pushed a commit that referenced this issue Nov 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants