From 1d9c2d0bba924a7f739f5b1d36b4f84465a36fcb Mon Sep 17 00:00:00 2001 From: GNiendorf Date: Sun, 1 Sep 2024 14:46:36 -0400 Subject: [PATCH] Add GitHub Actions workflow for Python tests --- .github/workflows/python-tests.yml | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/python-tests.yml diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml new file mode 100644 index 0000000..6c558c0 --- /dev/null +++ b/.github/workflows/python-tests.yml @@ -0,0 +1,34 @@ +name: Python Tests + +on: + push: + branches: [ master, dev ] + pull_request: + branches: [ master ] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Miniconda + uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + python-version: 3.7 + + - name: Install dependencies + shell: bash -l {0} + run: | + conda create -n tracepyci python=3.7 --yes + conda activate tracepyci + conda install --yes numpy scipy matplotlib scikit-learn pandas pytest pytest-cov + pip install . + + - name: Run tests + shell: bash -l {0} + run: | + conda activate tracepyci + pytest tests/