From 3b8ddaa94caa4eaa4498707ea927faef4dfc69ca Mon Sep 17 00:00:00 2001 From: Stefan Date: Thu, 27 Jan 2022 20:25:13 +0100 Subject: [PATCH] ops: add workflow for static analysis --- .github/workflows/static.yml | 13 +++++++++++++ package.json | 1 + 2 files changed, 14 insertions(+) create mode 100644 .github/workflows/static.yml diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 0000000..dbb9984 --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,13 @@ +name: CI +on: push +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install modules + run: npm ci + - name: Lint + run: npm run lint + - name: Type Analysis + run: npm run type-check diff --git a/package.json b/package.json index 1c7b55e..dc2c17c 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "scripts": { "postcompile": "ncp LICENSE dist/LICENSE && ncp README.md dist/README.md && ts-node -T misc/copy-static-files.ts && ts-node -T misc/correct-types.ts", "lint": "eslint ./src --ignore-path .gitignore", + "type-check": "tsc --noEmit", "lint:fix": "npm run lint -- --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx}\" --ignore-path .gitignore", "compile": "rimraf dist/ && ttsc -p ./tsconfig.production.json",