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

Fixup for OS selection in GitHub Actions unittests workflow #628

Merged
merged 8 commits into from Oct 10, 2022
14 changes: 8 additions & 6 deletions .github/workflows/unittests.yaml
Expand Up @@ -10,11 +10,18 @@ on:

jobs:
test:
runs-on: ubuntu-latest
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's been pretty lame on my part 😅

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11.0-rc.1"]
jayaddison marked this conversation as resolved.
Show resolved Hide resolved
exclude:
- os: macos-latest
python-version: "3.10"
- os: macos-latest
python-version: "3.11.0-rc.1"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strangely, all of the macos-latest builds succeeded except for one running this release candidate version of Py3.11.

For that version, schema data extraction failed for the generic wild_mode scraper test.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm having trouble figuring this one out. Despite enabling debug logging, there wasn't much additional context in the wild_mode scraper test failure output.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Roughly speaking: it's as if the unit test doesn't read the HTML content correctly (or at all?) when the TestWildMode test runs.

The errors arise when the scraper-under-test attempts to retrieve parsed schema.org JSON-LD fields from the content. For example, we see:

  File "/Users/runner/work/recipe-scrapers/recipe-scrapers/recipe_scrapers/_factory.py", line 21, in cook_time
    return self.schema.cook_time()
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/runner/work/recipe-scrapers/recipe-scrapers/recipe_scrapers/_schemaorg.py", line 120, in cook_time
    raise SchemaOrgException("Cooktime information not found in SchemaOrg")
recipe_scrapers._exceptions.SchemaOrgException: recipe-scrapers exception: Cooktime information not found in SchemaOrg

Note that this is happening in Py3.10 as well as seen in the latest builds.

- os: windows-latest
python-version: "3.11.0-rc.1"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
Expand All @@ -28,8 +35,3 @@ jobs:
- name: Unittest and Coverage Report
run: |
python run_tests.py
- name: coveralls.io
uses: AndreMiras/coveralls-python-action@develop
with:
# coveralls repo token
github-token: "SmlfzlVJy4ow55rduU7IU5GmmFCfAdGeq"