LunatiqueCoder / luna

Luna - a React Native + Next.js template. Built with TypeScript :heart:
https://luna-gamma.vercel.app/
MIT License
264 stars 17 forks source link

test: add CI via github actions, with related supporting commits #9

Closed mikehardy closed 2 years ago

mikehardy commented 2 years ago

This is a series of commits (rebase merge should work to keep them in line and separate in the commit history) to enable testing via GitHub actions

each commit is tiny and has it's own commit message for easy review if you click in commits and roll through them (I use keyboard n "next" and p "previous" personally to do this super fast if you haven't tried it)

The CI workflows are taken from other repos I work on where they've been crafted over a couple years and work reliably without flaking but with good caching

mikehardy commented 2 years ago

unsure why the github actions don't run on the pull request but likely because they need to merge first and be on default branch :thinking:

mikehardy commented 2 years ago

Nothing like testing to show problems. Initial push had a problem that I fixed and re-pushed. You can see testing here: https://github.com/mikehardy/luna/actions

Proof of successful jest run: https://github.com/mikehardy/luna/runs/4036756352#step:8:6 Proof of successful linting run: https://github.com/mikehardy/luna/runs/4036755494#step:8:12

(you can even see the yarn install about to flake - yarn install is a common source of flakes - but the retry action catching it and powering through for a green check mark: https://github.com/mikehardy/luna/runs/4036755494#step:7:40 )

mikehardy commented 2 years ago

Great! Thanks for the approve - I'm going to merge this then rebase it out of the follow-on. Something isn't quite right with the github action on my fork (it doesn't seem to want to run? although I can manually trigger it) and I think there might actually be a test failure in the follow-on after adding the vector icon on to the test. So the follow-on should serve as a good CI check