Skip to content

Commit

Permalink
Switch miniconda test to using env file
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Jan 20, 2022
1 parent 0a85481 commit 53289dd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 28 deletions.
36 changes: 8 additions & 28 deletions .github/workflows/CI_conda.yml
Expand Up @@ -60,37 +60,17 @@ jobs:
miniforge-variant: Mambaforge
miniforge-version: latest
auto-activate-base: true
channels: conda-forge
python-version: ${{ matrix.python-version }}
activate-environment: test
environment-file: environment.yml
- name: "Install PySR"
run: |
mamba install -c conda-forge pip $(cat requirements.txt | grep -v "julia" | xargs echo | sed "s/_/-/g")
python -m pip install julia
python setup.py install
python -c 'import pysr; pysr.install()'
python3 -m pip install .
python3 -c 'import pysr; pysr.install()'
shell: bash
- name: "Ensure that static libpython warning appears"
run: python test/test_static_libpython_warning.py
- name: "Install Coverage tool"
run: mamba install -c conda-forge coverage coveralls
- name: "Run tests"
run: coverage run --source=pysr --omit='*/feynman_problems.py' -m unittest test.test
run: python3 test/test_static_libpython_warning.py
shell: bash
- name: Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.test-name }}
COVERALLS_PARALLEL: true
run: coveralls --service=github
coveralls:
name: Indicate completion to coveralls.io
needs: test
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install coveralls
coveralls --finish
- name: "Run tests"
run: python3 -m unittest discover -s test
shell: bash
14 changes: 14 additions & 0 deletions environment.yml
@@ -0,0 +1,14 @@
name: test
channels:
- conda-forge
- defaults
dependencies:
- python=3.9
- sympy
- pandas
- numpy
- scikit-learn
- setuptools
- pip
- pip:
- julia

0 comments on commit 53289dd

Please sign in to comment.