mikaello / norwegian-national-id-validator

Validate Norwegian national identity numbers
https://mikaello.github.io/norwegian-national-id-validator
MIT License
24 stars 7 forks source link

chore: Add Github Actions #24

Closed simenandre closed 4 years ago

simenandre commented 4 years ago

Hello 👋

This Pull Request introduces Github Actions. It builds on every push and pull request. It's configured with a matrix of Node versions (10,12,13), meaning that it builds on each of the different versions of Node. We are using Yarn, so the workflow also uses Yarn.

This is a pretty basic setup. We can improve with caching and maybe add canary builds as well (those can be added in separate PRs).

Fixes #19

mikaello commented 4 years ago

Hi

This seems to done pretty much exactly the same as Travis is already doing today (except for testing on more node versions). My thoughts behind #19 was to have automatic building of a pull request (both the branch itself and the merge between master and the branch). The situation today is that only master branch is built, and that seems to be the case with the GitHub Action in this PR as well.

I checked up on Travis CI now, and after they created the GitHub App this is actually included by default. The feature in GitHub they are hooking onto is called GitHub Checks. So by converting this project from travis-ci.org to travis-ci.com, "Checks" was activated for this repository. See this test PR for an example: https://github.com/mikaello/norwegian-national-id-validator/pull/25/checks?check_run_id=723346745

So I think I'll close this PR, since it does not bring much new and does not build PRs. But thanks anyway :-)

simenandre commented 4 years ago

This PR adds builds with Github checks as well on pull requests towards master branch. You can actually replace this part:

  pull_request:
    branches:
      - master

with:

  pull_request:

and it will build for PRs towards all branches. I just added it for convenience. I believe Travis and Github Actions can basically do the same, the only difference is that Actions can be found on its own tab here at Github and have a big community effort in terms of "actions" (a premade, reusable build step). I've made a few as well. Considering that you are currently using Travis, I don't see any reason to change to Github. If there ever would be any issues with Travis, I would see the issue differently. So in summary, I agree, let's keep Travis now that it has checks! 👍