From 8afc82a7ee5de0fada0bdca266f5575eb2eab1e9 Mon Sep 17 00:00:00 2001 From: capitnflam Date: Fri, 15 Mar 2024 23:15:08 +0100 Subject: [PATCH] ci: add check workflow (#11) --- .github/dependabot.yml | 12 ++++++------ .github/workflows/pr-check.yml | 32 ++++++++++++++++++++++++++++++++ package.json | 3 ++- 3 files changed, 40 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/pr-check.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9cc608e..2d3d263 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,11 +5,11 @@ version: 2 updates: - - package-ecosystem: "npm" # See documentation for possible values - directory: "/" # Location of package manifests + - package-ecosystem: 'npm' # See documentation for possible values + directory: '/' # Location of package manifests schedule: - interval: "monthly" - - package-ecosystem: "github-actions" - directory: "/" + interval: 'monthly' + - package-ecosystem: 'github-actions' + directory: '/' schedule: - interval: "monthly" + interval: 'monthly' diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml new file mode 100644 index 0000000..f8eb476 --- /dev/null +++ b/.github/workflows/pr-check.yml @@ -0,0 +1,32 @@ +name: PR Check + +on: + push: + branches-ignore: + - main + +jobs: + pr-check: + name: PR Check + runs-on: ubuntu-latest + env: + HUSKY: 0 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + - name: Install dependencies + run: npm ci + - name: Lint + run: npm run lint + - name: Type check + run: npm run type-check + - name: Build + run: npm run build + # - name: Test + # run: npm run test diff --git a/package.json b/package.json index bd9f8e0..292d183 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "lint": "prettier --check .", "pre-commit": "lint-staged", "prepare": "husky", - "semantic-release": "semantic-release" + "semantic-release": "semantic-release", + "type-check": "tsc --pretty --noEmit" }, "bugs": "https://github.com/capitnflam/eslint-plugin/issues", "dependencies": {