sbugert / react-native-admob

A react-native component for Google AdMob banners
BSD 2-Clause "Simplified" License
1.13k stars 532 forks source link

add GitHub workflow that sets up a React Native project with the library #479

Closed koenpunt closed 4 years ago

koenpunt commented 4 years ago

I've updated the UI Tests in the iOS project to assert an ad being rendered, and setup up GitHub CI to run these tests.

koenpunt commented 4 years ago

Hey @sbugert, can you maybe sign up for the GitHub Actions beta, so I can use it in this repo?

https://github.com/features/actions

Signup should be immediately accepted.

sbugert commented 4 years ago

Hey @koenpunt, I've already signed up quite a while ago, I don't understand why the workflow does not show up in the Actions tab. Maybe it still only works for the default branch? According to this thread it's still unclear to me if this is already a feature.

We could try changing the default branch to ci for a test? Btw great idea and thanks for all the work! :)

Edit: Do you see the Actions tab next to the Pull requests link?

koenpunt commented 4 years ago

I was thinking similar things, but when I pushed it to my fork, it just worked; https://github.com/koenpunt/react-native-admob/runs/233747514

So not sure what the issue is, maybe they are still gradually updating users from the old format to the yaml format...

Btw, I'm seeing this banner in the repo;

image

So maybe you can change something in the settings of the repo?

koenpunt commented 4 years ago

Btw great idea

Yeah I'm quite done with users saying "it doesn't work", while for me it works just fine. So I figured if I can demonstrate it's working on CI, I can simply refer to that :)

sbugert commented 4 years ago

Btw, I'm seeing this banner in the repo; So maybe you can change something in the settings of the repo?

I don't see a banner but I can click on the actions tab. But it only let's me create a new workflow there. And I did not find any settings related to actions.

Does it already work correctly for your fork? Then, I guess there's no reason not to try merging it to master and see if it works then. Or we could just wait to see if they're really still migrating the users :)

koenpunt commented 4 years ago

I've finalised the config, and it's running correctly on my fork: https://github.com/koenpunt/react-native-admob/commit/250daa4dc296d27e0072fe9a8cfddf6d9dddca9c/checks

koenpunt commented 4 years ago

CI is working now! I was thinking to build it on a schedule, like every 7 days or so. What do you think?

sbugert commented 4 years ago

Looks great! I can see it now in the actions tab. Maybe because it's not a draft PR anymore?

Running it every 7 days sounds good. The only reason for it to break is Google changing something, isn't it?

koenpunt commented 4 years ago

The only reason for it to break is Google changing something, isn't it?

That, or the React Native implementation changes. But both are good to know early on of course.