Added missing imports #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
# Sequence of patterns matched against refs/heads | |
branches: | |
# Push events on main and dev branch | |
- dynamic-lmi | |
# Sequence of patterns matched against refs/tags | |
tags: '*' | |
jobs: | |
shellcheck: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Check if 'scripts' directory exists | |
run: | | |
if [ -d "scripts" ]; then | |
echo "scripts directory exists." | |
else | |
echo "scripts directory does not exist, skipping ShellCheck." | |
exit 0 | |
fi | |
shell: bash | |
- name: Install ShellCheck | |
run: | | |
sudo apt-get update -q && sudo apt-get install -yq shellcheck | |
shell: bash | |
- name: Check shell scripts | |
if: ${{ hashFiles('assets/') != '' }} | |
run: | | |
shellcheck scripts/*.sh | |
shellcheck scripts/core/*.sh | |
shell: bash | |
test: | |
name: ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- '1.8' | |
os: | |
- ubuntu-latest | |
arch: | |
- x64 | |
exclude: | |
- os: macOS-latest | |
arch: x86 | |
python-version: ["3.8"] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Create and activate virtual environment | |
run: | | |
python -m venv env | |
source env/bin/activate | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install matplotlib pandas scikit-learn h5py setuptools tqdm faiss-cpu pytest | |
pip install torch --index-url https://download.pytorch.org/whl/cpu | |
pip install -e . | |
- name: Check installed packages | |
run: pip list | |
- name: Run tests | |
run: pytest search/tests |