This repository was archived by the owner on Jan 30, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
84 lines (77 loc) · 2.57 KB
/
run_mamba_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Run micromamba tests
on:
workflow_dispatch:
pull_request:
branches:
- master
jobs:
test_micromamba:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
repository: mamba-org/mamba
ref: master
path: upstream-mamba
- uses: actions/checkout@v2
with:
repository: conda-incubator/conda-lock
ref: main
path: conda-lock
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Setup env micromamba nightly release
shell: bash
run: |
python -m pip install pytest requests pytest-lazy-fixture
python -m pip install git+https://github.com/conda/[email protected]
- name: Install zsh, xonsh and fish on Linux
shell: bash
if: runner.os == 'Linux'
run: |
sudo apt-get install zsh xonsh fish -y
- name: Install fish on macOS
shell: bash
if: runner.os == 'macOS'
run: |
brew install fish
- name: Setup env micromamba nightly release
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl $(python get_latest_micromamba.py nightly) -L -o micromamba
chmod u+x ./micromamba
- name: Run tests on micromamba nightly
shell: bash
run: |
export TEST_MAMBA_EXE=$(pwd)/micromamba
export CONDA_PREFIX=$(pwd)/mambaroot
export MAMBA_ROOT_PREFIX=$(pwd)/mambaroot
mkdir -p $CONDA_PREFIX
./micromamba install xtensor -c conda-forge
pytest upstream-mamba/micromamba/tests
- name: Run conda-lock tests
shell: bash
continue-on-error: true
if: runner.os == 'Linux' || runner.os == 'macOS'
run: |
export CONDA_PREFIX=$(pwd)/mambaroot
export MAMBA_ROOT_PREFIX=$(pwd)/mambaroot
mkdir -p $CONDA_PREFIX
export PATH=$(pwd):$CONDA_PREFIX/bin/:$PATH
./micromamba install mamba pip pytest-cov pytest-xdist -c conda-forge
cd conda-lock
python -m pip install ensureconda==1.2.1
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m pip install .
cp -a tests "${RUNNER_TEMP}/"
pushd "${RUNNER_TEMP}"
export TMPDIR="${RUNNER_TEMP}"
pytest --showlocals -vrsx --cov=conda_lock tests