12 generalize downloader #133
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: Lint | |
| on: [pull_request] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| Pylint: | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash -el {0} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Miniforge | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| miniforge-variant: Miniforge3 | |
| miniforge-version: latest | |
| activate-environment: climateset | |
| use-mamba: true | |
| - name: Install Poetry | |
| run: | | |
| make poetry-install-venv | |
| - name: Cache Poetry virtualenv and dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/pypoetry | |
| ~/.cache/pip | |
| key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
| restore-keys: | | |
| poetry-${{ runner.os }}- | |
| - name: Get Date | |
| id: get-date | |
| run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - name: Cache Conda env | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.CONDA }}/envs | |
| key: | |
| conda-${{ runner.os }}--${{ runner.arch }}--${{ | |
| steps.get-date.outputs.today }}-${{ | |
| hashFiles('etc/example-environment-caching.yml') }}-${{ env.CACHE_NUMBER | |
| }} | |
| env: | |
| CACHE_NUMBER: 0 | |
| id: cache | |
| - name: Update environment | |
| run: | |
| mamba env update -n climateset -f environment.yml | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| - name: Install dependencies | |
| run: | | |
| make install-dev | |
| - name: Run linting checks | |
| run: | | |
| make pylint |