diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..8afafe4 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,30 @@ +name: check + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + format-and-build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + cache-dependency-path: '**/package-lock.json' + + - name: Install dependencies + run: npm ci + + - name: Format check + run: npm run format.check + + - name: Build + run: npm run build