Skip to content

Instantly share code, notes, and snippets.

@LukaHarambasic
Last active December 21, 2020 21:52
Show Gist options
  • Save LukaHarambasic/0ef1c88782b6e8b138d5d0319f5a3a85 to your computer and use it in GitHub Desktop.
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`
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