3.2.3 dev #271
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 run -n test conda info | |
| conda run -n test conda install -c conda-forge -c loop3d --file dependencies.txt gdal python=${{ matrix.python-version }} pytest -y | |
| - name: Install map2loop | |
| run: | | |
| conda run -n test python -m pip install . | |
| - name: Run tests | |
| run: | | |
| conda run -n test pytest | |