Added check path step #4
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 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
shell: bash -el {0} | |
run: | | |
conda create -n env python=3.8 | |
conda activate env | |
conda install matplotlib pandas scikit-learn | |
pip install --upgrade pip | |
pip install h5py setuptools tqdm faiss-cpu pytest | |
pip install torch --index-url https://download.pytorch.org/whl/cpu | |
- name: Check PATH | |
run: echo $PATH | |
- name: Run tests | |
run: pytest |