diff --git a/.github/workflows/quality-checks.yml b/.github/workflows/quality-checks.yml new file mode 100644 index 00000000..aeaa45bd --- /dev/null +++ b/.github/workflows/quality-checks.yml @@ -0,0 +1,66 @@ +name: Quality checks + +on: + pull_request: + push: + +jobs: + format: + name: Format check + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - name: Setup node + uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 + with: + node-version-file: '.node-version' + cache: 'npm' + - name: Install dependencies + run: npm ci + - name: Check formatting + run: npm run fmt:check + + lint: + name: Lint + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - name: Setup node + uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 + with: + node-version-file: '.node-version' + cache: 'npm' + - name: Install dependencies + run: npm ci + - name: Run ESLint + run: npm run lint + + typecheck: + name: Typecheck + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - name: Setup node + uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 + with: + node-version-file: '.node-version' + cache: 'npm' + - name: Install dependencies + run: npm ci + - name: Run TypeScript typecheck + run: npm run typecheck -- --pretty false