[pre-commit.ci] pre-commit autoupdate #1756
Workflow file for this run
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: miranda Testing Suite | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - .cruft.json | |
| - CHANGELOG.rst | |
| - README.rst | |
| - pyproject.toml | |
| - tests/test_miranda.py | |
| - src/miranda/__init__.py | |
| pull_request: | |
| concurrency: | |
| # For a given workflow, if we push to the same branch, cancel all previous builds on that branch except on master. | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| permissions: | |
| contents: read | |
| env: | |
| MIRANDA_TESTDATA_BRANCH: v2025.5.16 | |
| jobs: | |
| lint_and_docs: | |
| name: ${{ matrix.name }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - name: 'Lint' | |
| tox-env: 'lint' | |
| python-version: "3.14" | |
| - name: 'Docs' | |
| tox-env: 'docs' | |
| python-version: "3.14" | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4 | |
| with: | |
| disable-sudo: false | |
| egress-policy: audit | |
| - name: Checkout Repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python${{ matrix.python-version }} | |
| uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| - name: Install HDF5 | |
| if: matrix.tox-env == 'docs' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libhdf5-dev | |
| - name: Install CI libraries | |
| run: | | |
| python -m pip install --require-hashes -r CI/requirements_ci.txt | |
| - name: Environment Caching | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: | | |
| .tox | |
| key: ${{ hashFiles('pyproject.toml', 'tox.toml') }}-${{ matrix.tox-env }} | |
| - name: Run lint and docs testing suite | |
| run: | | |
| python -m tox -e ${{ matrix.tox-env }} | |
| env: | |
| READTHEDOCS: 1 | |
| test-pypi: | |
| name: Test with Python${{ matrix.python-version }} (tox, ${{ matrix.os }}) | |
| needs: lint_and_docs | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ 'ubuntu-latest' ] | |
| python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ] | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4 | |
| with: | |
| disable-sudo: false | |
| egress-policy: audit | |
| - name: Checkout Repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| - name: Install GDAL and HDF5 | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libgdal-dev libhdf5-dev | |
| - name: Install CI libraries | |
| run: | | |
| python -m pip install --require-hashes -r CI/requirements_ci.txt | |
| - name: Environment Caching | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: .tox | |
| key: ${{ matrix.os }}-Python${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'tox.toml') }} | |
| - name: Test with tox | |
| run: | | |
| python -m tox | |
| - name: Report Coverage | |
| uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7 | |
| with: | |
| flag-name: run-${{ matrix.python-version }}-pypi | |
| parallel: true | |
| test-conda: | |
| name: Test with Python${{ matrix.python-version }} (Anaconda, ${{ matrix.os }}) | |
| needs: lint_and_docs | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ 'ubuntu-latest' ] | |
| python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ] | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4 | |
| with: | |
| disable-sudo: true | |
| egress-policy: audit | |
| - name: Checkout Repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Conda (Micromamba) with Python${{ matrix.python-version }} | |
| uses: mamba-org/setup-micromamba@d7c9bd84e824b79d2af72a2d4196c7f4300d3476 # v3.0.0 | |
| with: | |
| cache-downloads: true | |
| cache-environment: true | |
| environment-file: environment-dev.yml | |
| create-args: >- | |
| python=${{ matrix.python-version }} | |
| - name: Manual install of pyessv-archive | |
| run: | | |
| mkdir -p ~/.esdoc | |
| git clone https://github.com/ES-DOC/pyessv-archive.git ~/.esdoc/pyessv-archive | |
| - name: Install miranda | |
| run: | | |
| python -m pip install --no-deps . | |
| - name: Check versions | |
| run: | | |
| micromamba list | |
| python -m pip check || true | |
| - name: Test with pytest | |
| run: | | |
| python -m pytest --durations=10 --cov=miranda --cov-report=lcov | |
| - name: Report Coverage | |
| uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7 | |
| with: | |
| flag-name: run-Python${{ matrix.python-version }}-conda | |
| parallel: true | |
| finish: | |
| name: Finish | |
| needs: | |
| - test-pypi | |
| - test-conda | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4 | |
| with: | |
| disable-sudo: true | |
| egress-policy: audit | |
| - name: Coveralls Finished | |
| uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7 | |
| with: | |
| parallel-finished: true |