diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..73d3f8e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,24 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + branches: + - '**' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: '20.x' + - run: npm ci + - run: npm run format:check + - run: npm run lint:check + - run: npm run test diff --git a/package.json b/package.json index d4016aa..480ca1b 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,11 @@ "main": "index.js", "scripts": { "start": "node index.js", - "test": "echo \": no test specified\"", + "test": "echo no test specified", + "lint:check": "eslint .", + "lint:write": "eslint --fix .", + "format:check": "prettier --check .", + "format:write": "prettier --write .", "prepare": "husky install" }, "lint-staged": {