fhdsl / metricminer

R package that digs up data that matters from APIs, making it dashboard-ready
https://hutchdatascience.org/metricminer/
MIT License
2 stars 0 forks source link

Part 1 unit testing: token handling and authorization testing #26

Closed cansavvy closed 9 months ago

cansavvy commented 10 months ago

Purpose/implementation Section

What changes are being implemented in this Pull Request?

Part 1

Here I've set up some unit tests for authorization, calendly, and google analytics.

Basically the github actions here will check things whenever a pull request is opened. I had to add some additional infrastructure so that the github actions will fail if the testthat tests fail.

The authorization for the github actions happens first by using the auth_from_secrets() function and grabs the secrets from GitHub secrets on this repository.

Locally I have these same auth secrets stored in my Rprofile when I'm testing things. And I can run this same code.