Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
webbah authored and webbah committed Feb 24, 2022
2 parents e639125 + 8924a94 commit a81e522
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 48 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Build

on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
workflow_dispatch:

jobs:
build-code:
runs-on: ubuntu-latest
strategy:
max-parallel: 5

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda install -c conda-forge pyfmi
pip install -r requirements.txt
pip install .[all]
pip install -r requirements_dev.txt
conda install pytest
- name: Test with pytest
run: pytest
build-doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build Sphinx documentation
uses: ammaraskar/sphinx-action@master
with:
pre-build-command: "python -m pip install -r requirements_dev.txt"
docs-folder: "docs/"
# Publish built docs to gh-pages branch.
# ===============================
- name: Commit documentation changes
run: |
git clone https://github.com/upb-lea/openmodelica-microgrid-gym.git --branch gh-pages --single-branch gh-pages
cp -r docs/_build/html/* gh-pages/
cd gh-pages
touch .nojekyll
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update documentation" -a || true
# The above command will fail if no changes were present, so we ignore
# that.
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
# ===============================
46 changes: 0 additions & 46 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ OpenModelica Microgrid Gym
.. |nbsp| unicode:: U+00A0 .. NO-BREAK SPACE

.. |build| image:: https://travis-ci.org/upb-lea/openmodelica-microgrid-gym.svg?branch=master
:target: https://travis-ci.org/github/upb-lea/openmodelica-microgrid-gym
.. |build| image:: https://github.com/upb-lea/openmodelica-microgrid-gym/actions/workflows/build_and_test.yml/badge.svg
:target: https://github.com/upb-lea/openmodelica-microgrid-gym/actions/workflows/build_and_test.yml

.. |cov| image:: https://codecov.io/gh/upb-lea/openmodelica-microgrid-gym/branch/master/graph/badge.svg
:target: https://codecov.io/gh/upb-lea/openmodelica-microgrid-gym
Expand Down

0 comments on commit a81e522

Please sign in to comment.