Skip to content

Public release, 2025-07 #79

Public release, 2025-07

Public release, 2025-07 #79

Workflow file for this run

name: tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
cpu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set environment variables
run: |
echo "CURRENT_WEEK=$(date +'%Y-%U')" >> $GITHUB_ENV
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: v1-${{ env.CURRENT_WEEK }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ hashFiles('requirements-healpix.txt') }}-${{ hashFiles('constraints.txt') }}
- name: Install dependencies
run: |
python -m pip install uv
# can't use --system here because it doesn't work with --no-build-isolation and a healpix dependency
uv venv --python 3.11
uv pip install -c constraints.txt -e .[dev]
uv pip install --no-build-isolation -c constraints.txt -e .[dev,healpix]
- name: Run pytest with code coverage
run: |
source .venv/bin/activate
make test_cov
cpu-very-fast-no-healpix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set environment variables
run: |
echo "CURRENT_WEEK=$(date +'%Y-%U')" >> $GITHUB_ENV
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: v1-${{ env.CURRENT_WEEK }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ hashFiles('constraints.txt') }}
- name: Install dependencies
run: |
python -m pip install uv
uv pip install --system -c constraints.txt -e .[dev]
- name: Run pytest
run: |
make test_very_fast
gpu:
# These steps run on our self-hosted k8s GPU runners. See below for setup notes
# https://github.com/ai2cm/long-lived-infrastructure#installing-the-github-actions-runner-controller
runs-on: arc-runner-set
steps:
- uses: actions/checkout@v3
- name: Set environment variables
run: |
echo "CURRENT_WEEK=$(date +'%Y-%U')" >> $GITHUB_ENV
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ env.CURRENT_WEEK }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ hashFiles('requirements-healpix.txt') }}-${{ hashFiles('constraints.txt') }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y make git build-essential
python -m pip install uv
# can't use --system here because it doesn't work with --no-build-isolation and a healpix dependency
uv venv --python 3.11
uv pip install -c constraints.txt -e .[dev]
uv pip install --no-build-isolation -c constraints.txt -e .[dev,healpix]
- name: Run CUDA check and pytest
run: |
source .venv/bin/activate
export PATH=/usr/local/nvidia/bin:${PATH}
export LD_LIBRARY_PATH=/usr/local/nvidia/lib64:${LD_LIBRARY_PATH}
python3 fme/require_gpu.py
make test