ScottishCovidResponse / SCRCIssueTracking

Central issue tracking repository for all repos in the consortium
6 stars 0 forks source link

Move CI System to GitHub Actions #776

Open kzscisoft opened 3 years ago

kzscisoft commented 3 years ago

As discussed in meetings, moving the Python framework CI to GitHub actions from Travis to ensure a single system across all languages.

As with Travis, ensure:

kzscisoft commented 3 years ago

@bobturneruk Given #770, I currently have the CI run without Conda. I don't use it nor do I know how to (I keep hearing issues with it so choose alternatives). Not sure how to proceed with the "release" aspect of the CI.

kzscisoft commented 3 years ago

On the topic of point Tests Pass I seem to be having an issue on the CI that doesn't happen locally which makes me wonder if it is a module version thing:

 ______________________________ test_get_repo_info ______________________________

    def test_get_repo_info():
        repo_info = get_repo_info(Path(__file__), "default_repo")
        assert isinstance(repo_info, RepoInfo)
        if git_installed:
>           assert (
                repo_info.uri
                == "https://github.com/ScottishCovidResponse/data_pipeline_api.git"
            )
E           AssertionError: assert 'https://gith..._pipeline_api' == 'https://gith...eline_api.git'
E             Skipping 47 identical leading characters in diff, use -v to show
E             - ipeline_api.git
E             ?            ----
E             + ipeline_api

It seems the URI within the API no longer has .git at the end.

bobturneruk commented 3 years ago

@bobturneruk Given #770, I currently have the CI run without Conda. I don't use it nor do I know how to (I keep hearing issues with it so choose alternatives). Not sure how to proceed with the "release" aspect of the CI.

We currently have PyPi and conda releases. I think we might consider stopping support for conda packages (and just using conda as a virtual environment into which we pip install things). Happy to discuss further. Does this help you move forwards?

kzscisoft commented 3 years ago

We currently have PyPi and conda releases. I think we might consider stopping support for conda packages (and just using conda as a virtual environment into which we pip install things). Happy to discuss further. Does this help you move forwards?

I don't use conda at all in the CI now. I was wondering if perhaps Poetry would be a good idea although I a biased to it. It combines development with virtual environment.

bobturneruk commented 3 years ago

For now, we should do whatever the quickest thing is to get CI going on OSX and Windows - long terms decisions can wait? @kzscisoft , @DennisReddyhoff

DennisReddyhoff commented 3 years ago

https://github.com/airqo-platform/AirQo-modules/actions/workflows/python-app.yml

We used actions for CI in the AirQo project to test on all OS's simultaneously. The use of Tox isn't actually necessary here in the end, it could just as easily be pytest. We used setup.py here for the installation/package management