From a92c1b36897755af09b43cdc81803754701b8fd4 Mon Sep 17 00:00:00 2001 From: Kush Banker Date: Fri, 23 Jun 2023 13:33:59 +0100 Subject: [PATCH] Added github action to run tests --- .github/workflows/run_tests.yml | 28 ++++++++++++++++++++++++++++ environment.yml | 6 ++++++ 2 files changed, 34 insertions(+) create mode 100644 .github/workflows/run_tests.yml create mode 100644 environment.yml diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml new file mode 100644 index 0000000..e0715bd --- /dev/null +++ b/.github/workflows/run_tests.yml @@ -0,0 +1,28 @@ +name: Python Package using Conda + +on: [push] + +jobs: + build-linux: + runs-on: ubuntu-latest + strategy: + max-parallel: 5 + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: '3.10' + - 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 env update --file environment.yml --name base + python -m pip install colossus + - name: Test with pytest + run: | + conda install pytest + pytest \ No newline at end of file diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000..4b826df --- /dev/null +++ b/environment.yml @@ -0,0 +1,6 @@ +name: szsims +dependencies: + - numpy + - pandas + - astropy + - scipy \ No newline at end of file