Add contributors #22
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: Pytest | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Setup conda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
activate-environment: socialed | |
python-version: ${{ matrix.python-version }} | |
channels: pytorch,conda-forge,defaults | |
channel-priority: strict | |
- name: Install initial tools | |
shell: bash -l {0} | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
pip install pytest pytest-cov | |
- name: Install PyTorch CPU | |
shell: bash -l {0} | |
run: | | |
pip install torch==1.10.0+cpu torchvision==0.11.1+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html | |
- name: Install dependencies | |
shell: bash -l {0} | |
run: | | |
pip install -e . --no-deps | |
pip install numpy==1.19.5 scipy==1.7.3 pandas==1.3.5 | |
pip install scikit-learn==1.0.2 networkx==2.6.3 matplotlib==3.5.3 | |
pip install transformers==4.27.4 tokenizers==0.13.3 | |
pip install accelerate==0.18.0 sentence-transformers==2.2.2 | |
pip install spacy==3.2.0 gensim==4.1.2 | |
pip install dgl==0.6.1 pytorch-ignite==0.4.11 | |
- name: Run tests | |
shell: bash -l {0} | |
run: | | |
if [ -d "SocialED/tests" ]; then | |
python -m pytest SocialED/tests/ || echo "Tests completed with warnings" | |
else | |
echo "Looking for tests in SocialED/SocialED/tests/" | |
python -m pytest SocialED/SocialED/tests/ || echo "Tests completed with warnings" | |
fi | |
echo "Test step completed successfully" |