Skip to content

Commit

Permalink
🦀 Run lint in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
p-sad committed Apr 16, 2024
1 parent 1223af1 commit fcd5ed1
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Install Node and package dependencies
description: "Install Node dependencies with pnpm"

runs:
using: "composite"
steps:
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20

- uses: pnpm/action-setup@v3
with:
version: 8.3.1
run_install: false

- name: Get pnpm cache directory
id: pnpm-cache-dir
shell: bash
run: echo "dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Cache PNPM
uses: actions/cache@v4
id: pnpm-cache
with:
path: |
${{ steps.pnpm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-node-

- name: Install packages
shell: bash
run: pnpm install --frozen-lockfile

- name: Build everything in the monorepo
shell: bash
run: pnpm build
18 changes: 18 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: CI
env:
NEXT_VOUCHER_REDEEM_DEADLINE: 1713259853
on:
pull_request:
push:
branches:
- main
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
clean: false
- name: Install Node and dependencies
uses: ./.github/actions/install-dependencies
- run: pnpm run lint
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "0.0.1",
"packageManager": "[email protected]",
"scripts": {
"lint": "turbo lint",
"lint": "turbo lint --filter=frontend",
"build": "turbo build",
"test": "turbo test",
"verify": "turbo verify"
Expand Down

0 comments on commit fcd5ed1

Please sign in to comment.