Skip to content

Commit

Permalink
ci: 💚 Introduce lint CI (#9)
Browse files Browse the repository at this point in the history
* ci: 💚 Introduce lint CI
* ci: add `--no-bundle` option to skip bundling on CI
* ci: limit push ci to master branch
  • Loading branch information
BlankParticle authored Feb 5, 2024
1 parent ab4b3e2 commit 6216ce0
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Code Quality

on:
push:
branches:
- master
pull_request:


jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout Code 🛎
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Setup pnpm 📦
uses: pnpm/action-setup@v2
with:
version: "8"

- name: Setup Node.js 🟩
uses: actions/setup-node@v4
with:
cache: "pnpm"
node-version: "20"

- name: Install Dependencies 📥
run: pnpm install

- name: Build 🏗
run: pnpm build -- --no-bundle

- name: Lint 🧹
run: pnpm lint
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"extension-install": "pnpm build && gnome-extensions install dist/*.shell-extension.zip -f",
"update-pot": "xgettext --from-code=UTF-8 extension.js ui.js Settings.ui -o po/bluetooth-quick-connect.pot",
"format": "biome format --write ./**/*.ts",
"lint": "biome lint ./**/*.ts && tsc",
"fix": "biome lint --apply ./**/*.ts"
"fix": "biome lint --apply ./**/*.ts",
"lint": "biome lint ./**/*.ts && biome format ./**/*.ts && tsc"
},
"sideEffects": false,
"devDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig } from "tsup";
import { $, fs } from "zx";
import { fs, $ } from "zx";

export default defineConfig({
entry: ["src/*.ts"],
Expand Down Expand Up @@ -27,6 +27,7 @@ export default defineConfig({
].join("\n"),
},
onSuccess: async () => {
if (process.argv.includes("--no-bundle")) return;
await copyAssets();
await packExtension();
},
Expand Down

0 comments on commit 6216ce0

Please sign in to comment.