diff --git a/.flake8 b/.flake8 index 84252c8..25b33fb 100644 --- a/.flake8 +++ b/.flake8 @@ -1,4 +1,4 @@ [flake8] -extend-exclude = _skbuild/,siliconcompiler/ +extend-exclude = .venv/,siliconcompiler/ max-line-length = 100 ignore = diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 33643ba..c49fcff 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -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 . diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 034b966..809bf75 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 -m "not wheel" + + # change running directory + mkdir testrun + cd testrun + + pytest $GITHUB_WORKSPACE -m "not wheel" diff --git a/conftest.py b/conftest.py new file mode 100644 index 0000000..f17200b --- /dev/null +++ b/conftest.py @@ -0,0 +1,3 @@ +collect_ignore = [ + "siliconcompiler/" +] diff --git a/pyproject.toml b/pyproject.toml index d8e77aa..38ab6d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,9 @@ build-backend = "setuptools.build_meta" markers = [ "wheel: wheel only tests." ] -testpaths = "tests" +testpaths = [ + "tests" +] pythonpath = [ - "siliconcompiler/siliconcompiler/toolscripts" + "siliconcompiler/siliconcompiler/toolscripts" ]