Skip to content

Commit

Permalink
Add upstream CI (#577)
Browse files Browse the repository at this point in the history
* add upstream dev CI

* add cartopy to upstream dev testing
  • Loading branch information
kafitzgerald committed Jan 3, 2024
1 parent 547b8d8 commit f48a523
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/upstream-dev-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI Upstream
on:
schedule:
- cron: "0 0 * * *" # daily at 00:00 UTC
workflow_dispatch: # allows you to trigger the workflow run manually

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
upstream-dev:
name: upstream-dev
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch all history for all branches and tags.
- name: set up environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: conda_environment.yml
create-args: >-
python=${{ matrix.python-version }}
- name: install upstream versions
run: |
bash ci/install-upstream.sh
- name: environment info
run: |
conda info
conda list
- name: make html
working-directory: ./docs
run: |
make html
37 changes: 37 additions & 0 deletions ci/install-upstream.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env bash
# adapted from https://github.com/pydata/xarray/blob/main/ci/install-upstream-wheels.sh

# forcibly remove packages to avoid artifacts
conda remove -y --force \
metpy \
numpy \
pandas \
scipy \
xarray \
matplotlib \
geocat-viz \
geocat-comp \
cartopy

# conda list
conda list

# if available install from nightly wheels
python -m pip install \
--index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \
--extra-index-url https://pypi.org/simple \
--no-deps \
--pre \
--upgrade \
numpy \
pandas \
scipy \
xarray \
matplotlib

# install rest from source
python -m pip install \
git+https://github.com/Unidata/MetPy.git \
git+https://github.com/NCAR/geocat-comp.git \
git+https://github.com/NCAR/geocat-viz.git \
git+https://github.com/SciTools/cartopy.git
3 changes: 3 additions & 0 deletions conda_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ dependencies:
- metpy
- nbsphinx
- netcdf4
- numpy
- pandas
- pillow
- pip
- scikit-learn
- scipy
- sphinx-book-theme
- sphinx-design
- sphinx-gallery
Expand Down

0 comments on commit f48a523

Please sign in to comment.