From 1ddfd41a188cbbb62d0f7540256b2781f4eeb93d Mon Sep 17 00:00:00 2001 From: Marshall Polaris Date: Sat, 21 May 2022 12:42:59 -0700 Subject: [PATCH] Add GitHub 'check' workflow to do static analysis (#286) --- .github/workflows/check.yml | 49 +++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/check.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 00000000..b3c267fc --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,49 @@ +name: Check PRs + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + setup: + name: Set up test environment + runs-on: ubuntu-latest + permissions: + contents: read + security-events: write + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Prepare Node environment + uses: actions/setup-node@v3 + with: + node-version: latest + cache: 'yarn' + - name: Install dependencies + run: yarn install --frozen-lockfile + + prettier: + needs: setup + name: Run Prettier + steps: + - run: npx prettier . + + eslint: + needs: setup + name: Run ESLint on web client + steps: + - run: cd web && yarn lint + + tsc-web: + needs: setup + name: Run Typescript checker on web client + steps: + - run: tsc --pretty --project web/tsconfig.json --noEmit + + tsc-functions: + needs: setup + name: Run Typescript checker on cloud functions + steps: + - run: tsc --pretty --project functions/tsconfig.json --noEmit