diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a707379 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,19 @@ +# Workflow for code checks +name: Check code + +on: + pull_request: + branches: [master] + push: + branches: [master] +jobs: + format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Use Node.js 20.x + uses: actions/setup-node@v3 + with: + node-version: 20.x + - run: yarn install + - run: yarn run lint:check diff --git a/package.json b/package.json index 8aaa8b9..fc718ab 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "main": "main.bundle.js", "license": "UNLICENSED", "scripts": { + "lint:check": "prettier . --check", "start": "node ./scripts/dev.js", "test": "mocha -r esm -r ts-node/register src/**/*.test.ts", "test:one": "mocha -r ts-node/register -r esm"