From 6f4bf0e98ac2517f28cc1a03564641e1d9c8b45a Mon Sep 17 00:00:00 2001 From: Sander Roet Date: Wed, 21 Feb 2024 17:54:53 +0100 Subject: [PATCH] get gh workflows working (#116) * initual guess for github workflow * try moving it to the job instead * try pulling code into the docker * syntax * initial try to get the complete workflow * use quates for lines with brackets in yml files... * nvm, strip extra ':' instead * use multiline run statements instead: * install into the base conda env instead * go to single line run instead --- .github/workflows/unit-tests.yml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index a781e505..4e005cfb 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -12,16 +12,20 @@ on: # Weekly on saturday 23:59 - cron: "59 23 * * 6" -defaults: - runs-on: [self-hosted, linux, x64, gpu] - container: - image: continuumio/miniconda3 - options: --runtime=nvidia --gpus all - jobs: test_suite: + runs-on: [self-hosted, linux, x64, gpu] + container: + image: continuumio/miniconda3 + options: --runtime=nvidia --gpus all steps: - - name: check running dir - run: ls -a . - - name: test-gpu-avail - run: nvidia-smi + - name: Pull code + uses: actions/checkout@v4 + - name: Install dependencies + run: conda install -y -c conda-forge python=3 cupy cuda-version=11.8 + - name: Install code and list dependencies + run: | + python -m pip install .[plotting] + conda list + - name: Run tests + run: cd tests && python -m unittest discover