Skip to content
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
112 changes: 112 additions & 0 deletions .github/workflows/build-test-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: Build/Test CI

on: [push, pull_request]

jobs:
build-and-test:
runs-on: ${{ matrix.os }}

defaults:
run:
shell: bash -l {0}

strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.8, 3.9]

steps:
- uses: actions/checkout@v2
with:
submodules: true

- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
mamba-version: "*"
channels: conda-forge
channel-priority: true

- name: Install dependencies
run: |
mamba install --file=requirements.txt --file=requirements-testing.txt
conda list

- name: Install babelizer
run: |
pip install .

- name: Run diagnostics
run: |
babelize --version
babelize --help
babelize init --help
babelize update --help
babelize generate --help
babelize generate - --no-input
python -c 'import babelizer; print(babelizer.__version__)'

- name: Make C example
run: |
mkdir buildc && pushd buildc
cmake ../external/bmi-example-c -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX
make install
popd

- name: Make C++ example
run: |
mkdir buildcxx && pushd buildcxx
cmake ../external/bmi-example-cxx -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX
make install
popd

- name: Make Fortran example
run: |
mkdir buildf && pushd buildf
cmake ../external/bmi-example-fortran -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX
make install
popd

- name: Make Python example
run: |
pushd ./external/bmi-example-python
make install
popd

- name: Test language examples
run: |
pytest -vvv

lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Lint
run: |
pip install flake8
make lint

docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Build docs
run: |
pip install -r requirements.txt -r requirements-docs.txt
pip install -e .
make -C docs clean html
83 changes: 0 additions & 83 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Changelog for babelizer
0.3.7 (unreleased)
------------------

- Nothing changed yet.
- Use GitHub Actions for continuous integration (#39)


0.3.6 (2021-01-13)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Before you submit a pull request, check that it meets these guidelines:
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
3. The pull request need only work with Python >= 3.8. Check
https://travis-ci.org/csdms/babelizer/pull_requests
https://github.com/csdms/babelizer/actions
and make sure that the tests pass.

Deploying
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. image:: https://travis-ci.com/csdms/babelizer.svg?branch=develop
:target: https://travis-ci.com/csdms/babelizer
.. image:: https://github.com/csdms/babelizer/workflows/Build/Test%20CI/badge.svg
:target: https://github.com/csdms/babelizer/actions?query=workflow%3A%22Build%2FTest+CI%22

.. image:: https://readthedocs.org/projects/babelizer/badge/?version=latest
:target: https://babelizer.readthedocs.io/en/latest/?badge=latest
Expand Down