3.2.3 dev #255
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: Linting and Testing | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - '**.py' | |
| - .github/workflows/linting_and_testing.yml | |
| pull_request: | |
| branches: | |
| - master | |
| paths: | |
| - '**.py' | |
| - .github/workflows/linting_and_testing.yml | |
| workflow_dispatch: | |
| jobs: | |
| linting: | |
| name: Linting | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install black ruff | |
| ruff check . --fix | |
| - uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: "style: style fixes by ruff and autoformatting by black" | |
| testing: | |
| name: Testing${{ matrix.os }} python ${{ matrix.python-version }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ${{ fromJSON(vars.BUILD_OS)}} | |
| python-version: ${{ fromJSON(vars.PYTHON_VERSIONS)}} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| conda-remove-defaults: "true" | |
| - name: Install dependencies | |
| run: | | |
| conda update -n base -c defaults conda -y | |
| conda install -n base conda-libmamba-solver -c conda-forge -y | |
| conda install -c conda-forge gdal -y | |
| conda install -c conda-forge -c loop3d --file dependencies.txt -y | |
| conda install pytest -y | |
| - name: Install map2loop | |
| run: | | |
| python -m pip install . | |
| - name: Run tests | |
| run: | | |
| pytest | |