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

Refactor ci tests #48

Open
wants to merge 66 commits into
base: main
Choose a base branch
from
Open

Refactor ci tests #48

wants to merge 66 commits into from

Conversation

ScottGibb
Copy link
Collaborator

@ScottGibb ScottGibb commented Dec 18, 2024

Description

We want to have our CI tests generic such that they can run on multiple hardware targets. This PR is focusing on the refactoring of the tests to suit this requirement. With the end goal being to run our tests in the CI pipeline using the following:

  • ESP32C3
  • FT232H
  • Raspberry Pi I2C Pins

Type of change

Please Tick the options that are relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

This will be updating our CI so it should be tested using that and individual machines

Hardware In the Loop Tests

  • Will be adding ESP32C3 Test Example
    • Buy another TMAG Module for the Test bench

Checklist

  • My code follows the style guidelines of this project (this should be caught by the CI)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings (this should be caught by the CI)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link
Contributor

github-actions bot commented Dec 18, 2024

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ ACTION actionlint 4 0 0.13s
✅ JSON jsonlint 3 0 0.2s
✅ JSON prettier 3 0 0 0.52s
✅ MARKDOWN markdownlint 12 0 0 0.84s
✅ MARKDOWN markdown-link-check 12 0 8.48s
✅ MARKDOWN markdown-table-formatter 12 0 0 0.23s
✅ RUST clippy yes no 26.22s
✅ YAML prettier 7 0 0 0.59s
✅ YAML yamllint 7 0 0.37s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

Copy link
Collaborator

@petekubiak petekubiak left a comment

Choose a reason for hiding this comment

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

Very cool, really like the testing framework you've set up here!

@ScottGibb ScottGibb marked this pull request as draft December 18, 2024 19:24

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

MegaLinter has automatically applied linters fixes on this PR.
Please review the changes and merge if they are correct.
PR: #50

@ScottGibb ScottGibb marked this pull request as ready for review December 20, 2024 14:52
@ScottGibb
Copy link
Collaborator Author

@petekubiak @jamessizeland We now have full CI Testing on both ESP32 and Linux with without the FT232H Board. Next PR will be to add Raspberry Pi Pico and STM32. Covering all modern MCUs. Dependabot should also use this testing setup going forward to that any minor dependancy bumps will be verified through the CI.

@petekubiak
Copy link
Collaborator

Fantastic work, well done!

@ScottGibb ScottGibb marked this pull request as draft December 23, 2024 09:40
@ScottGibb
Copy link
Collaborator Author

Test Bench is now confirmed working!

  • Checked the Docker Container didnt have any dangling dependencies
  • Solved probe-rs issue where the debug probe wouldn't mount properly. (Had to use debian-image)
  • Bought Extra TMAG Modules so we can run our CI continuously

At the moment the CI will fail for one of the tests as we don't have the hardware. (Bought some more TMAG boards and will install when they arrive)

I did find an interesting bug with the integration tests where all the cold start tests would work repeatably without having to do a cold start except from the conversion status register. Because of this, I have turned off this test via a comment. This allows us to test our library in CI repeatably.

@ScottGibb ScottGibb marked this pull request as ready for review December 23, 2024 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request github_actions Pull requests that update GitHub Actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants