Skip to content

Commit

Permalink
Merge pull request #35 from brews/add_ghactions_tests
Browse files Browse the repository at this point in the history
Add simple github-actions workflow to test code
  • Loading branch information
brews authored Jun 23, 2022
2 parents 9cd3e95 + 6d780e0 commit ecdd7db
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 14 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/pythonpackage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Python package

on:
pull_request:
push:
branches:
- "master"

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.x"]
defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'requirements_dev.txt'
- name: Install dependencies
run: |
pip install -r requirements_dev.txt
- name: Install package
run: |
pip install .
- name: Format check with flake8
run: |
flake8
- name: Test with pytest
run: |
pytest -v --cov climate_toolbox --cov-report term-missing --cov-report xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
4 changes: 0 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
pytest-cov==2.7.1
scipy==1.3.0
xarray==0.12.1
toolz==0.9.0
5 changes: 0 additions & 5 deletions requirements_conda.txt
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
pandas==0.20.3
xarray
scipy
numpy
toolz
13 changes: 8 additions & 5 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
datafs==0.7.1
pip==9.0.1
bumpversion==0.5.3
wheel==0.29.0
flake8==3.3.0
flake8
tox==2.7.0
coverage==4.4.1
Sphinx==1.6.3
PyYAML>=4.2b1
pytest==3.1.3
pytest
pytest-runner==2.11.1
pytest-cov==2.5.1
pytest-cov
py==1.4.34
numpy
pandas
scipy
toolz
xarray

0 comments on commit ecdd7db

Please sign in to comment.