Skip to content

Commit

Permalink
ci: Add linter workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Pradumnasaraf committed Jun 24, 2023
1 parent 904e2e7 commit 18a4e6f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Unit Tests + Lint

on:
workflow_dispatch:
push:
paths:
- "**.js"
pull_request:
paths:
- "**.js"

jobs:
tests:
runs-on: ubuntu-latest

steps:
- name: Checking and cloning the repo
uses: actions/checkout@v3

- name: Node Instllation
uses: actions/setup-node@v3
with:
node-version: "18"

- name: Install dependencies
run: npm ci

- name: Run lint
run: npm run lint
3 changes: 2 additions & 1 deletion .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ jobs:
steps:
- name: Chekout Repo
uses: actions/checkout@v3

- name: Node Setup
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Install Dependencies
run: npm ci
- name: Prettier
run: npx prettier --check '**/*.js' '*.{js,md}'
run: npx prettier --write '**/*.js' '*.{js,md}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: stefanzweifel/git-auto-commit-action@v4
Expand Down

0 comments on commit 18a4e6f

Please sign in to comment.