Skip to content
Snippets Groups Projects
Forked from CDOS-Pub / dinamis-sdk
56 commits behind the upstream repository.
.gitlab-ci.yml 2.11 KiB
default:
  image: python:3.8-slim

workflow:
  rules:
    - if: $CI_MERGE_REQUEST_ID
    - if: $CI_COMMIT_BRANCH == 'main'

stages:
  - Static Analysis
  - Install
  - Documentation
  - Test
  - Ship

# ------------------------------ Static analysis ------------------------------

.static_analysis_base:
  stage: Static Analysis
  allow_failure: true

flake8:
  extends: .static_analysis_base
  script:
    - pip install flake8
    - flake8 $PWD/dinamis_sdk

pylint:
  extends: .static_analysis_base
  script:
    - pip install pylint appdirs requests pystac pystac-client pydantic urllib3 qrcode
    - pylint $PWD/dinamis_sdk --disable=W0718,W0603,R0914,C0415 --ignore=examples

codespell:
  extends: .static_analysis_base
  script: 
    - pip install codespell
    - codespell dinamis_sdk docs README.md

pydocstyle:
  extends: .static_analysis_base
  script:
    - pip install pydocstyle
    - pydocstyle $PWD/dinamis_sdk

# ------------------------------- Install -------------------------------------

pip_install:
  stage: Install
  script:
    - pip install .

# --------------------------------- Doc ---------------------------------------

.doc_base:
  stage: Documentation
  before_script:
    - pip install -r doc/doc_requirements.txt
  artifacts:
    paths:
      - public
      - public_test

test:
  extends: .doc_base
  except:
    - main
  script:
    - mkdocs build --site-dir public_test