-
Notifications
You must be signed in to change notification settings - Fork 97
71 lines (59 loc) · 1.86 KB
/
test_conda_build.yaml
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
name: "Test Conda Build"
on:
pull_request:
paths:
- ".github/workflows/test_conda_build.yaml"
- "pyproject.toml"
push:
branches:
- main
- release/\d{4}.\d{1,2}.\d{1,2}
paths:
- ".github/workflows/test_conda_build.yaml"
- "pyproject.toml"
jobs:
test-conda-build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
steps:
- name: "Checkout Infrastructure"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: "3.10"
channels: conda-forge
activate-environment: nebari-dev
conda-remove-defaults: true
- name: Install dependencies
run: |
conda install grayskull conda-build conda-verify # conda-index
pip install build
- name: Conda list
run: |
conda list
- name: Generate sdist
run: |
python -m build --sdist
- name: Generate meta.yaml
run: |
python -m grayskull pypi dist/*.tar.gz
- name: Build conda package
run: |
conda build . --output-folder conda-bld
# python -m conda_index $(pwd)/conda-bld
# Store the path for the next step
echo "CONDA_BLD_PATH=$(pwd)/conda-bld" >> $GITHUB_ENV
- name: Test conda package
run: |
NEBARI_VERSION=$(conda search -c local --override-channels nebari --json | jq -r '.nebari[0].version')
conda create -n test-env -c file://${{ env.CONDA_BLD_PATH }} "nebari=$NEBARI_VERSION"
conda run -n test-env --live-stream nebari --version