kentcdodds / babel-plugin-macros

🎣 Allows you to build simple compile-time libraries
https://npm.im/babel-plugin-macros
MIT License
2.62k stars 135 forks source link

add a github action to run unit tests on pull requests #110

Closed voldemortensen closed 5 years ago

voldemortensen commented 5 years ago

What: This PR add a GitHub Action that run npm run setup -s when a pull request is submitted.

Why: This helps ensure code quality and testing standards are maintained.

How: With a Dockerfile and shell script.

npm run setup -s run build, lint, and test scripts. If any of these scripts fail they will return with a non-zero exit code and show as a failed check on a pull request.

voldemortensen commented 5 years ago

This is basically what runs on TravisCI, but using GitHub actions instead. This action can be chained with a "release" workflow in the future (i.e. when a release is published, tests are run and a package is built/published to NPM/GitHub Registry).

kentcdodds commented 5 years ago

Thanks @voldemortensen! Really interesting.

I think I'm going to hold off on moving to GitHub actions though. I'm already really familiar with Travis and right now I see no benefit of going with GitHub Actions. What I really want is the ability to do an auto-release to GitHub's registry without worrying about tokens. That's probably a ways into the future though...

Thanks for teaching me though.

voldemortensen commented 5 years ago

Definitely. As soon as I get access to the registry beta I can put that together.