Skip to content

Commit 11605ae

Browse files
authored
Merge pull request #40 from siliconcompiler/gh-runners
fix github runners
2 parents e9e32a2 + 231c146 commit 11605ae

File tree

6 files changed

+24
-11
lines changed

6 files changed

+24
-11
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[flake8]
2-
extend-exclude = _skbuild/,siliconcompiler/
2+
extend-exclude = _skbuild/,siliconcompiler/,.venv/
33
max-line-length = 100
44
ignore =

.github/workflows/lint.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,8 @@ jobs:
2626

2727
- name: Lint with Flake8
2828
run: |
29-
python -m pip install flake8 -c ./requirements.txt
29+
python3 -m venv .venv
30+
. .venv/bin/activate
31+
32+
python3 -m pip install flake8 -c ./requirements.txt
3033
flake8 --statistics .

.github/workflows/tests.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ jobs:
4242

4343
- name: Run Python tests
4444
run: |
45+
python3 -m venv .venv
46+
. .venv/bin/activate
47+
4548
python3 -m pip install --upgrade pip
4649
python3 -m pip install .[test]
47-
pytest
50+
51+
# change running directory
52+
mkdir testrun
53+
cd testrun
54+
55+
pytest $GITHUB_WORKSPACE

conftest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
collect_ignore = [
2+
"siliconcompiler/",
3+
"_skbuild/"
4+
]

pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,10 @@ requires = [
1010
build-backend = "setuptools.build_meta"
1111

1212
[tool.pytest.ini_options]
13-
testpaths = "tests"
13+
testpaths = [
14+
"tests"
15+
]
1416
timeout = "120"
17+
addopts = [
18+
"--import-mode=importlib",
19+
]

tests/conftest.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22
import os
33

44

5-
@pytest.fixture
6-
def scroot():
7-
'''Returns an absolute path to the SC root directory.'''
8-
mydir = os.path.dirname(__file__)
9-
return os.path.abspath(os.path.join(mydir, '..', 'siliconcompiler'))
10-
11-
125
@pytest.fixture
136
def datadir(request):
147
'''Returns an absolute path to the current test directory's local data

0 commit comments

Comments
 (0)