Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial CI workflow #114

Merged
merged 5 commits into from
Sep 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI

on:
push:
branches: [stable, develop]
pull_request:
branches: [stable, develop]
workflow_dispatch:
schedule:
- cron: "0 12 * * 1"

jobs:
test:
name: Test
runs-on: ubuntu-latest
if: github.repository == 'noaa-oar-arl/monet'
strategy:
matrix:
python-version: ["3.6", "3.8", "3.10"]
defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v3

- name: Set up Python (micromamba)
uses: mamba-org/provision-with-micromamba@v13
with:
environment-file: environment-dev.yml
cache-env: true
extra-specs: |
python=${{ matrix.python-version }}

- name: Downgrade cf-xarray if on Python 3.6
if: matrix.python-version == '3.6'
run: micromamba install cf_xarray=0.6.3

- name: Install package
run: python -m pip install -e . --no-deps

- name: Test with pytest
run: pytest -v
2 changes: 1 addition & 1 deletion environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
- nodefaults
dependencies:
- python=3.9
- python>=3.6
#
# core
- cartopy
Expand Down