Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tests for all platforms #97

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,50 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest", "windows-latest" ] # todo support macos test
os: [ "macos-latest", "ubuntu-latest", "windows-latest" ]
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Homebrew for MacOs
if: matrix.os == 'macos-latest'
run: |
NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install autoconf
brew install automake
brew install libomp
- name: Get resource of SWIG for MacOs
if: matrix.os == 'macos-latest'
run: |
pip install --upgrade pip setuptools wheel
curl -L -o swig-3.0.12.tar.gz https://github.com/swig/swig/archive/refs/tags/v3.0.12.tar.gz
tar -xzf swig-3.0.12.tar.gz
curl -L -o pcre-8.44.tar.bz2 https://sourceforge.net/projects/pcre/files/pcre/8.44/pcre-8.44.tar.bz2/download
mv pcre-8.44.tar.bz2 pcre-8.44.tar
mv pcre-8.44.tar swig-3.0.12/
- name: Install SWIG for MacOs
if: matrix.os == 'macos-latest'
run: |
cd ./swig-3.0.12/
./Tools/pcre-build.sh
./autogen.sh
./configure
make
sudo make install
cd ..
rm -r ./swig-3.0.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade wheel setuptools
pip install ".${{ env.test-requires }}"
- name: Uninstall package openbox for MacOs
if: matrix.os == 'macos-latest'
run: |
pip uninstall -y openbox
- name: Run tests
run: |
pytest ${{ env.pytest-args }} ${{ env.test-dir }}
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ runs/
test/.ipynb_checkpoints/

# Code coverage files
.coverage
.coverage*
coverage.xml
test/datas

Expand Down
2 changes: 1 addition & 1 deletion requirements/main.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ matplotlib
pandas
numpy>=1.7.1
scipy>=0.18.1,<=1.10.1
scikit-learn>=0.21.3,<=1.1.3
scikit-learn>=0.21.3,<=1.5.1
scikit-optimize>=0.9
ConfigSpace>=0.4.20,<=0.6.1
emcee
Expand Down
Loading