diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..be709fc --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: CI + +on: + workflow_dispatch: + pull_request: + push: + branches: + - dev + - 'renovate/**' + - '!renovate/lock-file-maintenance' + +jobs: + CI: + strategy: + fail-fast: false + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: install pnpm + uses: pnpm/action-setup@v2 + with: + version: 7.x.x + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: pnpm + + - name: install dependencies + run: pnpm install + + - name: check formatting + run: pnpm format + + - name: run linter + run: pnpm lint + + #- name: run tests + # run: pnpm test diff --git a/package.json b/package.json index d87d260..65b6cec 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "scripts": { "build": "ncc build src/index.ts -o dist -m", "lint": "eslint src/**", - "format": "prettier -w src/** action.yml README.md" + "format": "prettier --write src/** action.yml README.md", + "format:check": "prettier --check src/** action.yml README.md" }, "repository": { "type": "git",