Skip to content

Commit

Permalink
Add Lint and fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mauriciabad authored Oct 17, 2023
1 parent 4adcbb2 commit 0c356df
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI
on: push
jobs:
lintfix:
name: Lint and fix
runs-on: ubuntu-latest
steps:
- name: πŸš€ Checkout
uses: actions/checkout@v3

- name: 🎯 Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm

- name: πŸ—οΈ Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'

- name: πŸ“¦ Setup pnpm - Install pnpm
uses: pnpm/action-setup@v2
with:
run_install: false

- name: πŸ“¦ Setup pnpm - Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: πŸ“¦ Setup pnpm - Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: πŸ“¦ Install dependencies
run: pnpm install

- name: πŸ”¦ Run lint
run: pnpm lint --fix

- name: πŸ–ŒοΈ Run format
run: pnpm format

- name: 🍾 Commit & Push changes
uses: actions-js/push@master
with:
message: 'chore: Auto-fix lint errors'
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/drizzle
pnpm-lock.yaml

0 comments on commit 0c356df

Please sign in to comment.