Skip to content

Commit

Permalink
Trt fix the CI and github actions
Browse files Browse the repository at this point in the history
Signed-off-by: Adam.Dybbroe <[email protected]>
  • Loading branch information
Adam.Dybbroe committed Nov 20, 2024
1 parent a78d7f4 commit 8ed05a8
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 9 deletions.
55 changes: 46 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,66 @@ on:
- pull_request

jobs:
build:
runs-on: ubuntu-latest
test:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: true
matrix:
os: ["windows-latest", "ubuntu-latest", "macos-latest"]
python-version: ["3.10", "3.11", "3.12"]
experimental: [false]
include:
- python-version: "3.12"
os: "ubuntu-latest"
experimental: true
env:
PYTHON_VERSION: ${{ matrix.python-version }}
OS: ${{ matrix.os }}
UNSTABLE: ${{ matrix.experimental }}
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5

- name: Setup Conda Environment
uses: conda-incubator/setup-miniconda@v3
with:
environment-file: continuous_integration/environment.yaml
miniforge-version: latest
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -U pytest pytest-cov numpy pyresample pyorbital six pyyaml defusedxml
- name: Install pytroll-collectors
activate-environment: test-environment

- name: Install unstable dependencies
if: matrix.experimental == true
shell: bash -l {0}
run: |
pip install --no-deps -e .
sudo apt-get install \
gcc \
python3-dev; \
python -m pip install \
-f https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/ \
--no-deps --pre --upgrade \
matplotlib \
numpy \
pandas \
geopandas \
scipy; \
python -m pip install \
--no-deps --upgrade \
git+https://github.com/dask/dask \
git+https://github.com/dask/distributed \
git+https://github.com/Unidata/cftime \
git+https://github.com/pydata/bottleneck \
git+https://github.com/pydata/xarray;
- name: Run tests
shell: bash -l {0}
run: |
pytest --cov=trollsched trollsched/tests --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
Expand Down
39 changes: 39 additions & 0 deletions continuous_integration/environment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: test-environment
channels:
- conda-forge
dependencies:
- xarray
- dask
- distributed
- toolz
- sphinx
- matplotlib
- mpl_toolkits
- cartopy
- scipy
- pyyaml
- coveralls
- coverage
- codecov
- behave
- netcdf4
- paramiko
- oauthlib
- watchdog
- s3fs
- shapely
- pyproj
- pandas
- geopandas
- mock
- pytest
- pytest-cov
- responses
- platformdirs
- defusedxml
- pyorbital
- pyresample
- trollsift
- pip
- pip:
- posttroll

0 comments on commit 8ed05a8

Please sign in to comment.