unikent / astro

MIT License
7 stars 2 forks source link

Setup gitlab CI to run tests and validation #231

Open jna-unikent opened 6 years ago

jna-unikent commented 6 years ago

As discussed with @samyapp and @christiancable, it is worth setting up Travis CI to run our test and validation suite until a time when we migrate to gitlab.

jna-unikent commented 6 years ago

We decided on Friday to pursue setting up gitlab CI instead, especially since there seems to be issues pulling down private dependencies.

jna-unikent commented 6 years ago

@christiancable and I have managed to get Gitlab CI running the schema validation and phpunit tests. The code that got it working can be found here: https://gitlab.kent.ac.uk/jna/astro/merge_requests/227.

Example of test passing: https://gitlab.kent.ac.uk/jna/astro/-/jobs/9102

To access non-public repositories (and some github ones), we had to generate Personal Access Tokens, setting them as environmental variables (https://gitlab.kent.ac.uk/jna/astro/settings/ci_cd see the secret variables section), and passing them to composer and packagist to use.

The current docker container being used was one built by Dom (https://hub.docker.com/r/domoconnor/gitlab-ci/). It runs php5.6. We will probably need to build one with php7.1 at some point.

jna-unikent commented 6 years ago

I have now added some new docker images (https://gitlab.kent.ac.uk/jna/astro/container_registry) built from the scripts in our docker repo (https://gitlab.kent.ac.uk/webdev/docker).