Skip to content

Commit

Permalink
ci: uv usage for fetch-product-types
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunato committed Oct 16, 2024
1 parent 8c5d59c commit 17e5112
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions .github/workflows/fetch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,20 @@ jobs:
with:
# Get history and tags for SCM versioning to work
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v5
- name: Install the latest version of uv with cache enabled
uses: astral-sh/setup-uv@v3
with:
python-version: "3.9"
- name: Update pip
run: python -m pip install --upgrade pip
- name: Get pip cache dir
id: pip-cache
shell: bash
run: echo "DIR=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Get current week number
id: get-week
shell: bash
run: echo "WEEK=$(date +'%V')" >> $GITHUB_OUTPUT
- name: Pip cache
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.DIR }}
key: ${{ runner.os }}-pip-${{ steps.get-week.outputs.WEEK }}-${{ hashFiles('setup.cfg') }}
- name: Install eodag
version: "latest"
enable-cache: true
cache-dependency-glob: ""
- name: Install eodag in venv
run: |
python -m pip install ".[all-providers]"
uv venv
source .venv/bin/activate
uv pip install ".[all-providers]"
- name: Fetch and update external product types reference
run: |
source .venv/bin/activate
export JSON_OUTPUT_FILE="eodag/resources/ext_product_types.json"
export JSON_REF_FILE=$(python -c "import eodag; print(eodag.config.EXT_PRODUCT_TYPES_CONF_URI)")
eodag -vvv discover --storage ${JSON_OUTPUT_FILE}
Expand Down

0 comments on commit 17e5112

Please sign in to comment.