Skip to content

Commit

Permalink
Updating workflows to Python 3.7, formatting of conftest
Browse files Browse the repository at this point in the history
  • Loading branch information
dkosteck committed Dec 16, 2022
1 parent 47165b6 commit 85e9c78
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/github-actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.6", "3.10"]
python-version: ["3.7", "3.10"]
steps:
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "This job is now running on a ${{ runner.os }} server hosted by GitHub!"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.6", "3.10"]
python-version: ["3.7", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -21,4 +21,4 @@ jobs:
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
flake8 . --count --ignore=E203,W503 --max-complexity=15 --max-line-length=88 --show-source --statistics
flake8 . --count --ignore=E203,W503 --max-complexity=15 --max-line-length=88 --show-source --statistics
9 changes: 2 additions & 7 deletions sriov/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,22 +161,18 @@ def parse_file_for_field(file_path, field) -> str:

@pytest.fixture(autouse=True)
def _report_extras(extra, request, settings, monkeypatch) -> None:
lines = []
monkeypatch.chdir(request.fspath.dirname)

try:
# This is assuming the current working directory contains the test
# specification.
with open(settings.config["tests_doc_file"]) as f:
lines = f.readlines()

case_name = parse_file_for_field(
settings.config["tests_doc_file"], settings.config["tests_name_field"]
)

if case_name != "":
sha = ''
git_tag = ''
sha = ""
git_tag = ""
try:
repo = git.Repo(search_parent_directories=True)
sha = repo.head.commit
Expand Down Expand Up @@ -209,7 +205,6 @@ def _report_extras(extra, request, settings, monkeypatch) -> None:
case_name = "No tag or commit hash: No Link to"
link = "#"


extra.append(
extras.html(
'<p>Link to the test specification: <a href="'
Expand Down

0 comments on commit 85e9c78

Please sign in to comment.