File: action.yml

package info (click to toggle)
stactools 0.5.3-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,796 kB
  • sloc: python: 4,498; xml: 554; sh: 395; makefile: 34
file content (39 lines) | stat: -rw-r--r-- 1,367 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Setup
description: Set up the stactools testing environment with conda, pip, and associated caches
inputs:
  python-version:
    description: Python version to set up w/ conda
    required: True
runs:
  using: composite
  steps:
    - name: Set up conda cache
      uses: actions/cache@v2
      with:
        path: ~/conda_pkgs_dir
        key: ${{ runner.os }}-conda-${{ hashFiles('environment.yml') }}
        restore-keys: ${{ runner.os }}-conda-
    - name: Set up pip cache
      uses: actions/cache@v2
      with:
        path: ~/.cache/pip
        key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
        restore-keys: ${{ runner.os }}-pip-
    - name: Set up pre-commit cache
      uses: actions/cache@v2
      with:
        path: ~/.cache/pre-commit
        key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml' )}}
        restore-keys: ${{ runner.os }}-pre-commit-
    - name: Set up Conda with Python ${{ inputs.python-version }}
      uses: conda-incubator/setup-miniconda@v2
      with:
        auto-update-conda: true
        channels: conda-forge
        python-version: ${{ inputs.python-version }}
    - name: Update Conda's environemnt
      run: conda env update -f environment.yml -n test
      shell: bash -l {0}
    - name: Update pip
      run: python -m pip install --upgrade pip
      shell: bash -l {0}