diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 23a93f84f..251278d5a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,6 +8,10 @@ on: branches: - "*" +defaults: + run: + shell: bash -l {0} + jobs: run: runs-on: ${{ matrix.os }} @@ -21,22 +25,26 @@ jobs: PYTHON: ${{ matrix.py_ver }} steps: - uses: actions/checkout@master - - uses: conda-incubator/setup-miniconda@v3.0.4 + - uses: mamba-org/setup-micromamba@v1 with: - auto-update-conda: true - channels: conda-forge,defaults - channel-priority: true - python-version: ${{ matrix.py_ver }} environment-file: environment.yaml - activate-environment: gs + create-args: >- + python=${{ matrix.py_ver }} + cache-environment: true - name: Conda info - shell: bash -l {0} run: | conda info --all conda list - + - name: Install conda-recipe-manager if possible + # If the Python version is >=3.11, then run `micromamba install -y -c conda-forge conda-recipe-manager` + run: | + if [ $(python -c "import sys; print(sys.version_info[:2] >= (3,11))") = "True" ]; then + echo "Installing conda-recipe-manager" + micromamba install -y -c conda-forge conda-recipe-manager + else + echo "Skipping conda-recipe-manager installation" + fi - name: Running doctests - shell: bash -l {0} run: | pytest grayskull \ -vv \ @@ -51,7 +59,6 @@ jobs: --junit-prefix=Linux-py${{ matrix.py_ver }}-serial - name: Running serial tests - shell: bash -l {0} run: | pytest tests \ -vv \ @@ -67,7 +74,6 @@ jobs: --junit-prefix=Linux-py${{ matrix.py_ver }}-serial - name: Running parallel tests - shell: bash -l {0} run: | pytest tests \ -vv \