Skip to content

Commit 07420d6

Browse files
authored
Merge pull request #69 from GFDRR/js/fix_failing_actions_workflow
Js/fix failing actions workflow
2 parents d5c7645 + 2880cef commit 07420d6

File tree

7 files changed

+401
-411
lines changed

7 files changed

+401
-411
lines changed

.github/workflows/unittests.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,18 @@ jobs:
1818
runs-on: ubuntu-latest
1919

2020
steps:
21-
# Check out repository
2221
- name: Checkout repository
2322
uses: actions/checkout@v3
2423

25-
# Set up Python
26-
- name: Set up Python 3.10
27-
uses: actions/setup-python@v4
24+
- name: Set up micromamba + environment
25+
uses: mamba-org/setup-micromamba@v2
2826
with:
29-
python-version: '3.10'
30-
31-
# Install dependencies
32-
- name: Install dependencies
33-
run: |
34-
# $CONDA is an environment variable pointing to the root of the miniconda directory
35-
$CONDA/bin/conda env update --file tools/code/rdl-tools.yml --name base
36-
37-
- name: Test with pytest
38-
run: |
39-
conda install pytest --solver=classic
40-
$CONDA/bin/pytest
27+
environment-file: tools/code/rdl-tools.yml
28+
cache-environment: true
29+
create-args: >-
30+
python=3.10
31+
init-shell: bash
32+
33+
- name: Run unit tests
34+
run: |
35+
micromamba run -n rdl-tools pytest

tools/code/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
from dotenv import dotenv_values, find_dotenv
55

66
config = dotenv_values(find_dotenv())
7-
DATA_DIR = config["DATA_DIR"]
7+
DATA_DIR = config["DATA_DIR"]
88
OUTPUT_DIR = config["OUTPUT_DIR"]
9-
CACHE_DIR = config["CACHE_DIR"]
9+
CACHE_DIR = config["CACHE_DIR"]
1010

1111
# Ensure output and cache dirs exist
1212
os.makedirs(OUTPUT_DIR, exist_ok=True)

0 commit comments

Comments
 (0)