CI: Schema files are written to a path the tests don't read, so the schema tests always skip

Open Beginner friendly
#637 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, python
Domain
ci-cd, testing-qa

Research direction

Start with .github/workflows/pr.yml lines 104-106 and the setup for JsonSerializationSchemaTest and XMLSerializationSchemaTest under test/adapter. Run the schema tests before and after aligning the workflow and test paths. Done means CI downloads the official schemas where the tests read them and both classes run instead of being skipped.

Written by the indexing model from the issue text.

Description

pr.yml downloads the schema files into ./test/adapter/schema:

https://github.com/eclipse-basyx/basyx-python-sdk/blob/develop/.github/workflows/pr.yml#L104-L106

The tests read them from ../schemas/test/adapter/schemas, which is also the path .gitignore covers (L27). The files never reach the tests, so JsonSerializationSchemaTest and XMLSerializationSchemaTest skip their entire class on every run. That is the skipped=2 in a green run, e.g. run 35359692685 on develop:

Ran 267 tests in 1.599s
OK (skipped=2)

So no serialization has been validated against the official AAS schema in CI. Issue #636 is what that hid: the JSON serializer emits an array the schema rejects, and both schema tests catch it the moment the files land in the right directory.

Renaming the directory in the workflow is enough to make them run. Two things worth deciding beyond that:

  • The skip is silent. setUpClass skipping when the file is missing is right for a local run, but in CI it turns a missing schema into a green build. An env var that makes the absence fatal there would keep both.
  • test/adapter/schema vs schemas reads like a typo anyone can repeat. Pointing both the workflow and the tests at one constant, or having the test download the file itself, removes the coupling.

Happy to send the rename, and either of the other two if you want them.

Dominant language
Python
Stars
102
Forks
52
Avg merge
20d 17h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eclipse-basyx/basyx-python-sdk

All issues in eclipse-basyx/basyx-python-sdk

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.