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

Fix: make workflow for testing packages with pytest work again #140

Merged
merged 1 commit into from
Dec 31, 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
30 changes: 16 additions & 14 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,30 @@ jobs:
fail-fast: false
matrix:
# ubuntu 22.04 has deprecated python 3.6
python-version: [ "3.8", "3.9", "3.10","3.11", "3.12", "3.13"]
python-version: [ "3.8", "3.9", "3.10","3.11", "3.12"]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: 'Build and install easygraph'
# still investigating issues, use the dummy workflow for now
# uses: tddschn/install-easygraph@master
uses: tddschn/install-easygraph/dummy@master
- name: Installing dependencies
uses: py-actions/py-dependency-install@v4
with:
# use current repo
repository: '${{ github.repository }}'
# use current branch
ref: '${{ github.ref }}'
install-pytorch: 'true'
install-lxml: 'true'
extra-modules-to-install: 'optuna torch_scatter torch_geometric'
path: "requirements.txt"

- name: Installing test dependencies
run: |
pip install pytest

- name: Build and install package
run: |
pip install .

- uses: actions/checkout@v3
- name: Test with pytest
run: |
pytest --disable-warnings
pytest --disable-warnings --ignore=cpp_easygraph
2 changes: 1 addition & 1 deletion easygraph/classes/test_base_graph_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import sys
import time

import tests
import easygraph as eg


print(
Expand Down
1 change: 0 additions & 1 deletion easygraph/classes/tests/test_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

# sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__),'..', '..')))
import easygraph as eg # Spend 4.9s on importing this damn big lib.
import tests


"""
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ nose>=1.3.7
pybind11>=2.10.4
pydsge
torch >= 1.12.1
requests
Loading