-
-
Notifications
You must be signed in to change notification settings - Fork 0
108 lines (90 loc) · 2.9 KB
/
conda_test.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Conda Test
on:
push:
branches:
- main
jobs:
build_wheels:
name: py${{ matrix.python }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest ]
# python: [ '3.7', '3.8', '3.9', '3.10' ]
python: [ '3.10' ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup miniconda3
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
auto-update-conda: true
# channel-priority: strict
# mamba-version: "*"
python-version: ${{ matrix.python }}
activate-environment: test
channels: conda-forge, mesonomics
- name: configure recipe conda environment
run: |
conda create -n recipe python=${{ matrix.python }}
conda install -y -n recipe boa conda-build
- name: conda info
run: |
conda info
conda list
- name: conda build for ${{ matrix.os }}
run: |
conda activate recipe
conda build --output-folder . -c conda-forge -c mesonomics --python ${{ matrix.python }} conda/zipline-tardis-bundle
- name: create local channel
run: |
mkdir -p /tmp/channel/linux-64
cp linux-64/zipline-tardis-bundle*.tar.bz2 /tmp/channel/linux-64
- name: index local channel
run: |
conda activate recipe
conda index /tmp/channel
- name: install zipline-tardis-bundle into test environment
run: |
conda activate test
conda install -y --override-channels -c file:///tmp/channel -c mesonomics -c conda-forge zipline-tardis-bundle
- name: run pytest
run: |
conda activate test
conda install -n test pytest pytest-mock mypy
cd tests
pytest
- name: Set HOME_PATH based on OS
run: |
if [[ "${{ runner.os }}" == "Windows" ]]; then
echo "HOME_PATH=${USERPROFILE}" >> $GITHUB_ENV
else
echo "HOME_PATH=${HOME}" >> $GITHUB_ENV
fi
- name: test install
run: |
conda activate test
install-tardis-bundle
rm $HOME_PATH/.zipline/extension.py
- name: store macos result
uses: actions/upload-artifact@v3
if: ${{ matrix.os == 'macos-latest' }}
with:
path: osx-64/*.tar.bz2
- name: store linux result
uses: actions/upload-artifact@v3
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
path: linux-64/*.tar.bz2
- name: store windows result
uses: actions/upload-artifact@v3
if: ${{ matrix.os == 'windows-latest' }}
with:
path: win-64/*.tar.bz2