Skip to content
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
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[flake8]
extend-exclude = _skbuild/,siliconcompiler/
extend-exclude = _skbuild/,siliconcompiler/,.venv/
max-line-length = 100
ignore =
5 changes: 4 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,8 @@ jobs:

- name: Lint with Flake8
run: |
python -m pip install flake8 -c ./requirements.txt
python3 -m venv .venv
. .venv/bin/activate

python3 -m pip install flake8 -c ./requirements.txt
flake8 --statistics .
10 changes: 9 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ jobs:

- name: Run Python tests
run: |
python3 -m venv .venv
. .venv/bin/activate

python3 -m pip install --upgrade pip
python3 -m pip install .[test]
pytest

# change running directory
mkdir testrun
cd testrun

pytest $GITHUB_WORKSPACE
4 changes: 4 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
collect_ignore = [
"siliconcompiler/",
"_skbuild/"
]
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,10 @@ requires = [
build-backend = "setuptools.build_meta"

[tool.pytest.ini_options]
testpaths = "tests"
testpaths = [
"tests"
]
timeout = "120"
addopts = [
"--import-mode=importlib",
]
7 changes: 0 additions & 7 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
import os


@pytest.fixture
def scroot():
'''Returns an absolute path to the SC root directory.'''
mydir = os.path.dirname(__file__)
return os.path.abspath(os.path.join(mydir, '..', 'siliconcompiler'))


@pytest.fixture
def datadir(request):
'''Returns an absolute path to the current test directory's local data
Expand Down
Loading