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

chore: type checks as part of the build #12

Merged
merged 3 commits into from
Apr 19, 2024
Merged

chore: type checks as part of the build #12

merged 3 commits into from
Apr 19, 2024

Conversation

webbertakken
Copy link
Member

@webbertakken webbertakken commented Apr 19, 2024

Changes

  • Adds ability to get type definitions from HA instance and check types during the build
  • Resolves Build process should type check #7
  • yarn build will locally always do the typechecks as part of the docker build (since you always have .env set.)
  • In CI it's a bit different - it'll still work out of the box, however:

because you need to have a publicly https-exposed HA instance, which means either Nabu Casa or a ton of manual work and maintenance. If you have Nabu Casa, you can simply put the Nabu Casa entrypoint to your HA Instance as the HASS_BASE_URL with the appropriate HASS_TOKEN and you're good to go; your CI will now fully check the integrity of your application in CI. When they are not set, they will simply be skipped. THIS MEANS YOUR BUILD DOESN'T HAVE TYPECHECKS IN CI, so recommend setting them.

This will be documented properly.

  • Move Dockerfile to the root
  • Move scripts completely into package.json
  • Remove /tools/ folder completely

Checklist

  • Read the contribution guide and accept the
    code of conduct
  • Readme and docs (updated or not needed)
  • Tests (added, updated or not needed)

Copy link

codecov bot commented Apr 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 12.85%. Comparing base (1b6ef99) to head (76a9433).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #12      +/-   ##
==========================================
+ Coverage   11.61%   12.85%   +1.24%     
==========================================
  Files           5        3       -2     
  Lines         155      140      -15     
  Branches        5        2       -3     
==========================================
  Hits           18       18              
+ Misses        133      120      -13     
+ Partials        4        2       -2     

@webbertakken webbertakken merged commit 95fd7a2 into main Apr 19, 2024
3 checks passed
@webbertakken webbertakken deleted the type-checks branch April 19, 2024 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build process should type check
1 participant