inseven / statuspanel

eInk desk calendar
https://statuspanel.io
MIT License
5 stars 0 forks source link

ci(service): Configure the APNS service for background push notifications #640

Closed jbmorley closed 1 year ago

jbmorley commented 1 year ago

This change introduces some guards in the web service that should ensure it fails to start up if APNS is incorrectly configured. This should serve to ensure the service doesn't pass tests or look like everything is working correctly if we can't send push notifications. The change also injects the APNS configuration into the server as part of the GitHub Actions deployment.

Unfortunately Apple seems to be rejecting APNS connections when we're running under GitHub Actions (maybe they've blocked the domain), so we're unable to actually able to exercise these new guards when under test, instead having to rely on a new SKIP_APNS_STARTUP_CHECK environment variable. Perhaps in the future we can mock the APNS endpoint for testing.

Includes a drive-by fix to rename the key id environment variable from ANPS_KEY_ID to APNS_KEY_ID.