From ce79dba37217db41312ddc2c4caf74b762092228 Mon Sep 17 00:00:00 2001 From: Gabriel do Carmo Vieira Date: Sun, 11 Aug 2024 00:18:34 -0300 Subject: [PATCH] ci: init pipeline --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++ biome.jsonc | 5 +++++ package.json | 3 ++- 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..2d6de2b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-24.04 + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Cache pnpm modules + id: pnpm-cache + uses: actions/cache@v4 + with: + path: ~/.pnpm-store + key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}- + + - name: Install Pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + run_install: false + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'pnpm' + + - name: Install dependencies + if: steps.pnpm-cache.outputs.cache-hit != 'true' + run: pnpm install + + - name: Check lint + run: pnpm run check:ci diff --git a/biome.jsonc b/biome.jsonc index 8dc298b..9cc1981 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -23,5 +23,10 @@ "enabled": true // Add here things that aren't default } + }, + "vcs": { + "enabled": true, + "clientKind": "git", + "useIgnoreFile": true } } diff --git a/package.json b/package.json index 688e639..898a569 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,8 @@ "dev:chrome": "plasmo dev --target=chrome-mv3", "package": "plasmo package", "check": "biome check", - "check:fix": "biome check --write" + "check:fix": "biome check --write", + "check:ci": "biome ci ." }, "dependencies": { "@plasmohq/messaging": "^0.6.2",