-
Notifications
You must be signed in to change notification settings - Fork 227
68 lines (64 loc) · 1.87 KB
/
CI_conda_forge.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
name: conda-forge
# This CI tries the conda-forge version of PySR
on:
schedule:
# Run at the 0th minute of the 10th hour (UTC).
# This means the job will run at 5am EST.
- cron: "0 10 * * *"
# This will automatically run on master branch only.
workflow_dispatch:
jobs:
conda_test:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
defaults:
run:
shell: bash -el {0}
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12']
os: ['ubuntu-latest']
use-mamba: [true, false]
include:
- python-version: '3.10'
os: 'windows-latest'
use-mamba: true
- python-version: '3.12'
os: 'windows-latest'
use-mamba: true
- python-version: '3.10'
os: 'macos-latest'
use-mamba: true
- python-version: '3.12'
os: 'macos-latest'
use-mamba: true
steps:
- name: "Set up Conda"
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Miniforge3
miniforge-version: latest
auto-activate-base: true
python-version: ${{ matrix.python-version }}
activate-environment: pysr-test
- name: "Install pysr with mamba"
run: |
echo "Installing pysr with mamba"
mamba install -y pysr
python -c "import pysr"
echo "Finished."
if: ${{ matrix.use-mamba }}
- name: "Install pysr with conda"
run: |
echo "Installing pysr with conda"
conda install -y pysr
python -c "import pysr"
echo "Finished."
if: ${{ !matrix.use-mamba }}
- name: "Run tests"
run: |
echo "Running tests"
pip install pytest nbval
python -m pysr test main,startup
echo "Finished."