Spaces:
Sleeping
Sleeping
MilesCranmer
commited on
Commit
•
53289dd
1
Parent(s):
0a85481
Switch miniconda test to using env file
Browse files- .github/workflows/CI_conda.yml +8 -28
- environment.yml +14 -0
.github/workflows/CI_conda.yml
CHANGED
@@ -60,37 +60,17 @@ jobs:
|
|
60 |
miniforge-variant: Mambaforge
|
61 |
miniforge-version: latest
|
62 |
auto-activate-base: true
|
63 |
-
channels: conda-forge
|
64 |
python-version: ${{ matrix.python-version }}
|
65 |
activate-environment: test
|
|
|
66 |
- name: "Install PySR"
|
67 |
run: |
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
python -c 'import pysr; pysr.install()'
|
72 |
- name: "Ensure that static libpython warning appears"
|
73 |
-
run:
|
74 |
-
- name: "Install Coverage tool"
|
75 |
-
run: mamba install -c conda-forge coverage coveralls
|
76 |
-
- name: "Run tests"
|
77 |
-
run: coverage run --source=pysr --omit='*/feynman_problems.py' -m unittest test.test
|
78 |
shell: bash
|
79 |
-
- name:
|
80 |
-
|
81 |
-
|
82 |
-
COVERALLS_FLAG_NAME: ${{ matrix.test-name }}
|
83 |
-
COVERALLS_PARALLEL: true
|
84 |
-
run: coveralls --service=github
|
85 |
-
coveralls:
|
86 |
-
name: Indicate completion to coveralls.io
|
87 |
-
needs: test
|
88 |
-
runs-on: ubuntu-latest
|
89 |
-
container: python:3-slim
|
90 |
-
steps:
|
91 |
-
- name: Finished
|
92 |
-
env:
|
93 |
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
94 |
-
run: |
|
95 |
-
pip install coveralls
|
96 |
-
coveralls --finish
|
|
|
60 |
miniforge-variant: Mambaforge
|
61 |
miniforge-version: latest
|
62 |
auto-activate-base: true
|
|
|
63 |
python-version: ${{ matrix.python-version }}
|
64 |
activate-environment: test
|
65 |
+
environment-file: environment.yml
|
66 |
- name: "Install PySR"
|
67 |
run: |
|
68 |
+
python3 -m pip install .
|
69 |
+
python3 -c 'import pysr; pysr.install()'
|
70 |
+
shell: bash
|
|
|
71 |
- name: "Ensure that static libpython warning appears"
|
72 |
+
run: python3 test/test_static_libpython_warning.py
|
|
|
|
|
|
|
|
|
73 |
shell: bash
|
74 |
+
- name: "Run tests"
|
75 |
+
run: python3 -m unittest discover -s test
|
76 |
+
shell: bash
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
environment.yml
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: test
|
2 |
+
channels:
|
3 |
+
- conda-forge
|
4 |
+
- defaults
|
5 |
+
dependencies:
|
6 |
+
- python=3.9
|
7 |
+
- sympy
|
8 |
+
- pandas
|
9 |
+
- numpy
|
10 |
+
- scikit-learn
|
11 |
+
- setuptools
|
12 |
+
- pip
|
13 |
+
- pip:
|
14 |
+
- julia
|