Last active
December 21, 2020 21:52
-
-
Save LukaHarambasic/0ef1c88782b6e8b138d5d0319f5a3a85 to your computer and use it in GitHub Desktop.
GitHub Action: execute lint and test on push for each pull request (PR) - easy to adapt for other npm/yarn scripts - works with Netlfiy and Vercel - just add the following file in the following directory `.github/workflows/checks.yml`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Checks | |
on: push | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: npm install | |
- run: npm run lint | |
test: | |
name: Test (jest) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: npm install | |
- run: npm run test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Link to article: https://harambasic.de/posts/adding-github-actions-for-testing-linting-to-all-my-repositories