diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml new file mode 100644 index 00000000..f915e3df --- /dev/null +++ b/.github/workflows/style.yml @@ -0,0 +1,23 @@ +name: Style Check + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + check: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js 19 + uses: actions/setup-node@v3 + with: + node-version: 19 + - run: npm install + - run: npx rescript format -all -check + - name: Helpful error message + if: failure() + run: echo "::error::Incorrect formatting. Please run 'npx rescript format -all' and commit the changes."