Skip to content

Use Travis to test deployment #22

@certik

Description

@certik

Currently we exit early if DEPLOY_TOKEN is empty, e.g. on Travis:

if [ "${DEPLOY_TOKEN}" = "" ]; then

So anything after that is not tested. As such, of course, I broke it in #17 when I modified the end of the script, even though Travis passed, and it had to be fixed by 07765a0. The solution is to add a Travis ssh key into the repository, using the travis subdirectory (see the README there for more info how it works), which will generate another set of private/public keys, and we put the public key into a new testing repository on github, which will receive deployments from PRs.

In addition, the Travis test which executes docker should then be written as close to real deployment as possible. This means the deployment repository URL should be passed as an environment variable. And probably we should pass another variable denoting how many times it should get deployed (2x should be tested --- to ensure that the upload.sh script can be executed 2x, this tests things like proper cleaning of generated files between runs), in production it's infinity, and finally, how much time between runs (something like 1s for testing, and 20 min for production).

That way everything will be tested to the very end, ensuring that it works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions