Merge pull request #35 from arifszn/lint-ci-cd

Create CI/CD for automated lint and prettier checking
This commit is contained in:
Ariful Alam 2022-03-20 02:00:25 +06:00 committed by GitHub
commit b864c2cdd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

38
.github/workflows/lint.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: Lint
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm ci
- name: Run linter
run: npm run lint
- name: Run prettier
run: npm run prettier