From 51fc981768fa66d557ba576fcb2dfaa43902128f Mon Sep 17 00:00:00 2001 From: Paul Xu Date: Mon, 26 Aug 2024 09:40:39 -0400 Subject: [PATCH] separate fast and slow tests --- .../{run_tests.yml => run_fast_tests.yml} | 5 +-- .github/workflows/run_slow_tests.yml | 43 +++++++++++++++++++ 2 files changed, 44 insertions(+), 4 deletions(-) rename .github/workflows/{run_tests.yml => run_fast_tests.yml} (93%) create mode 100644 .github/workflows/run_slow_tests.yml diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_fast_tests.yml similarity index 93% rename from .github/workflows/run_tests.yml rename to .github/workflows/run_fast_tests.yml index 55f59f84..e2df73d0 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_fast_tests.yml @@ -1,4 +1,4 @@ -name: Run tests +name: Run fast tests on: pull_request: @@ -42,8 +42,5 @@ jobs: - name: Run fast tests run: pytest -n auto -s --ignore=tests/slow - - name: Run slow tests - run: pytest -s tests/slow - - name: build docs run: mkdocs build diff --git a/.github/workflows/run_slow_tests.yml b/.github/workflows/run_slow_tests.yml new file mode 100644 index 00000000..74522a1c --- /dev/null +++ b/.github/workflows/run_slow_tests.yml @@ -0,0 +1,43 @@ +name: Run slow tests + +on: + pull_request: + +jobs: + run_tests: + runs-on: ubuntu-latest + defaults: + run: + shell: bash -el {0} + + strategy: + fail-fast: true + matrix: + python-version: ["3.10", "3.11"] + + steps: + - uses: actions/checkout@v4 + + - name: Setup miniconda + uses: conda-incubator/setup-miniconda@v3 + with: + python-version: ${{ matrix.python-version }} + miniforge-variant: Mambaforge + mamba-version: "*" + channels: conda-forge,defaults + channel-priority: true + + - name: install pymc and poetry + run: | + mamba info + mamba install -c conda-forge pymc poetry + + - name: install hssm + run: | + poetry export --with dev --without-hashes --output=req.txt + grep -v -E '^jax\[cuda12\]|^nvidia|^jax\-cuda12' req.txt >> requirements.txt + pip install -r requirements.txt + pip install -e . + + - name: Run slow tests + run: pytest -s tests/slow