From 1c229d97313885bfadc8306446626c532996e380 Mon Sep 17 00:00:00 2001 From: Vineet Bansal Date: Mon, 30 Sep 2024 11:45:02 -0400 Subject: [PATCH] Added workflow for testing on self-hosted GPU runner (#54) --- .github/workflows/test_pinned_deps_gpu.yml | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/test_pinned_deps_gpu.yml diff --git a/.github/workflows/test_pinned_deps_gpu.yml b/.github/workflows/test_pinned_deps_gpu.yml new file mode 100644 index 0000000..1ce0c22 --- /dev/null +++ b/.github/workflows/test_pinned_deps_gpu.yml @@ -0,0 +1,44 @@ +name: Test Pinned Dependencies on GPU + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build_wheels: + runs-on: [self-hosted, gpu] + strategy: + fail-fast: false + matrix: + python-version: ["3.12"] + + name: Build wheel and test + defaults: + run: + # Required when using an activated conda environment in steps + # See https://github.com/conda-incubator/setup-miniconda#IMPORTANT + shell: bash -l {0} + + steps: + - uses: actions/checkout@main + + - uses: conda-incubator/setup-miniconda@v3 + name: Setup conda environment + with: + auto-update-conda: true + python-version: ${{ matrix.python-version }} + activate-environment: paste + environment-file: environment.yml + + - name: Install package + # Note: editable install for the coverage step to pick up source + # correctly. (coverage run --source=src/paste3 -m pytest) + run: pip install . + + - name: Check Versions of Dependencies + run: pip freeze + + - name: Pytest + run: pytest