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

Starting CI #15

Merged
merged 7 commits into from
Feb 5, 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
57 changes: 57 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
name: build (${{ matrix.os }}, ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
python-version: ["3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install / build
run: |
python -m pip install --upgrade pip
pip install .

test:
name: test (${{ matrix.os }}, ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8", "3.9", "3.10"]
poetry-version: [1.1.11]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: |
poetry install
- name: Test with pytest
run: |
poetry run pytest gsw_xarray/tests
6 changes: 0 additions & 6 deletions gsw_xarray/tests/test_gsw_xarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,3 @@ def test_func_standard():
ds = _create_ds()
sigma0 = gsw.sigma0(SA=ds.SA, CT=ds.CT)
assert sigma0.attrs['standard_name'] == 'sea_water_sigma_t'

def test_func_standard_module():
"""gsw can be used with modules, e.g. gsw.density"""
ds = _create_ds()
sigma0 = gsw.density.sigma0(SA=ds.SA, CT=ds.CT)
assert sigma0.attrs['standard_name'] == 'sea_water_sigma_t'
84 changes: 42 additions & 42 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ xarray = "^0.20.2"
gsw = "^3.4.0"

[tool.poetry.dev-dependencies]
pytest = "^5.2"
pytest = ">=6.2.5"
DocOtak marked this conversation as resolved.
Show resolved Hide resolved
Sphinx = "^4.4.0"
furo = "^2022.1.2"

Expand Down