From 584bf6d84ed9b7c9fd4852f456e8bf87a79b4c61 Mon Sep 17 00:00:00 2001 From: Konrad Szwarc Date: Wed, 31 Aug 2022 00:37:14 +0200 Subject: [PATCH] Add static code quality check for PR's and the main branch --- .github/workflows/check-code-quality.yml | 42 ++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/check-code-quality.yml diff --git a/.github/workflows/check-code-quality.yml b/.github/workflows/check-code-quality.yml new file mode 100644 index 0000000..ad344fb --- /dev/null +++ b/.github/workflows/check-code-quality.yml @@ -0,0 +1,42 @@ +name: Check Code Quality + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + eslint: + name: Run ESlint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: 16 + cache: "npm" + + - name: Install dependencies + run: npm ci + + - name: Run ESLint + run: npm run lint + + typescript: + name: Check TypeScript types + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: 16 + cache: "npm" + + - name: Install dependencies + run: npm ci + + - name: Run TypeScript types check + run: npm run lint:ts