diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..89f8779 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +name: Tests + +on: + push: + pull_request: + +jobs: + tests: + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11.5" + + - name: Install test dependencies + run: | + python -m pip install --upgrade pip + python -m pip install pytest pyomo==6.8.0 idaes-pse==2.5.0 gridx-egret==0.5.5 numpy + pyomo build-extensions + idaes get-extensions + python -m pip install . + + - name: Run tests + run: | + python -m pytest \ + var_elim/algorithms/tests \ + var_elim/heuristics/tests \ + var_elim/mip_formulations/tests diff --git a/README.md b/README.md index 5df8914..4dc30ee 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,10 @@ Non-PyPI dependencies are: - [`nmpc_examples`](https://github.com/robbybp/nmpc_examples) - [`pselib`](https://github.com/robbybp/pselib) +[!Note] +It should not be necessary for uses to manually install these dependencies +as they are already included in the `requirements.txt` file. + When the main branch of this repository requires a specific branch of some dependency (e.g. the Pyomo main branch, rather than the latest release), an issue should be opened.