Refactore api & code quality #23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI Pipeline | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - '**' | |
| workflow_dispatch: | |
| jobs: | |
| build-env: | |
| name: Run CI | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: echo "------ Building environment ... ------" | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: install numpy | |
| run: | | |
| sudo apt-get install -y python3-numpy | |
| - name: Download OTB | |
| run: | | |
| mkdir -p $HOME/Downloads | |
| curl -L https://www.orfeo-toolbox.org/packages/archives/OTB/OTB-9.1.1-Linux.tar.gz -o $HOME/Downloads/OTB-9.1.1-Linux.tar.gz | |
| - name: Extract OTB | |
| run: | | |
| mkdir -p $HOME/OTB_install | |
| tar xf $HOME/Downloads/OTB-9.1.1-Linux.tar.gz --one-top-level=$HOME/OTB_install | |
| ls $HOME/OTB_install | |
| lsb_release -is | |
| - name: Source OTB Environment | |
| run: | | |
| source $HOME/OTB_install/otbenv.profile | |
| shell: bash | |
| - name: Install Eoscale | |
| run: | | |
| git clone https://github.com/CNES/eoscale.git | |
| cd eoscale | |
| pip install . | |
| - run: echo "------ Environment builded ! ------" | |
| - run: echo "------ passing formaters ... ------" | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Dependencies | |
| shell: bash | |
| run: pip install -e .[dev] | |
| - name: Run Black & Isort | |
| run: | | |
| black --check --diff slurp tests | |
| isort slurp tests --check --diff | |
| continue-on-error: true | |
| - run: echo "------ formaters done ! ------" | |
| - run: echo "------ Starting Pylint Analysis ... ------" | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| shell: bash | |
| run: pip install -e .[dev] | |
| - name: Run Pylint | |
| shell: bash | |
| run: | | |
| pylint --recursive=y --disable=all --fail-under=10 --enable=too-many-statements,too-many-nested-blocks slurp | |
| - name: Run McCabe Complexity Check | |
| shell: bash -l {0} | |
| run: | | |
| ./continuous_integration/scripts/check_mccabe_complexity.sh 25 slurp | |
| - run: echo "------ Pylint Analysis done ! ------" |