CosmiQ / solaris

CosmiQ Works Geospatial Machine Learning Analysis Toolkit
https://solaris.readthedocs.io
Apache License 2.0
411 stars 112 forks source link

[WIP] Move all CI/CD to Github Actions #446

Closed srmsoumya closed 2 years ago

srmsoumya commented 2 years ago

This PR adds support to lint, format & test the codebase across different python & gdal versions.

Description

We can run different steps as: tox -e [lint/test/format/flake8]

We are not relying on tox.ini file for running different python environments. That is taken care of using github runners. I commented out the format step as that would modify the codebase.

Fixes #440 [WIP]

Type of change

How Has This Been Tested?

There is technically no change in the codebase, so I have not added any new testcases.

Checklist:

cc @rbavery @vincentsarago

rbavery commented 2 years ago

@rodrigoalmeida94 @srmsoumya thanks for the heads up, just added you both as admins

rodrigoalmeida94 commented 2 years ago

@srmsoumya one thing I noticed with flake8 is the check occurs, and there are 217 errors, but the CI is not failing - trying to figure out why that is.

Also the lint command tox -e lint is only formatting the code (using black and isort, like format), I'll make a branch rewriting that step as lint. #450

srmsoumya commented 2 years ago

@rodrigoalmeida94 I guess you already figured this out. FWIW, adding runs like a list in tox files returns success code even when it fails the CI check.

rodrigoalmeida94 commented 2 years ago

@srmsoumya seems the issues has to do with writing commands with -. i.e. this:

[testenv:lint]
basepython = python3
skip_install = true
deps = flake8
commands = 
    - flake8 .

Will always return success (even if there are linter errors).

srmsoumya commented 2 years ago

451 supersedes this PR