Skip to content

Commit

Permalink
fix: Make eslint fail in GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
matvp91 committed Oct 8, 2024
1 parent 453408c commit b94d6ed
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 48 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Code Quality

on:
push:
pull_request:

jobs:
api:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v3
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Lint
run: ./scripts/lint.sh api
- name: Check Prettier
run: ./scripts/prettier-check.sh api
stitcher:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v3
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Lint
run: ./scripts/lint.sh stitcher
- name: Check Prettier
run: ./scripts/prettier-check.sh stitcher
5 changes: 0 additions & 5 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ concurrency:
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
name: Build
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -43,15 +41,12 @@ jobs:
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/lint.yml

This file was deleted.

3 changes: 1 addition & 2 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ on:
workflow_dispatch:

jobs:
run:
build:
runs-on: ubuntu-latest
name: Build
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
jobs:
unit_tests:
runs-on: ubuntu-latest
name: Unit Tests
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -22,6 +21,5 @@ jobs:
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Unit tests for stitcher
run: pnpm --filter "stitcher" test
continue-on-error: true
- name: Unit tests
run: pnpm test
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
"name": "mixwave",
"scripts": {
"dev": "./scripts/dev.sh",
"build": "./scripts/build.sh",
"lint": "./scripts/lint.sh"
"build": "./scripts/build.sh"
},
"packageManager": "[email protected]",
"devDependencies": {
Expand Down
7 changes: 1 addition & 6 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
echo "🎯 Running lint for packages/$1"

eslint "packages/$1/src/**/*.ts"
echo "✅ eslint"

prettier --check "packages/$1/src/**/*.ts"
echo "✅ prettier"
echo "✅ eslint"
2 changes: 2 additions & 0 deletions scripts/prettier-check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
prettier --check "packages/$1/src/**/*.ts"
echo "✅ prettier"

0 comments on commit b94d6ed

Please sign in to comment.