diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..04faa37 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,26 @@ +name: CI +on: + push: + branches: + - master + - develop + pull_request: + branches: + - master + - develop + +jobs: + run-action: + name: Run action + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Install modules + run: yarn + - name: ESLint + run: yarn lint + - name: Prettier + run: yarn format + - name: Typescript + run: yarn type \ No newline at end of file diff --git a/package.json b/package.json index 689059d..89beb8e 100644 --- a/package.json +++ b/package.json @@ -6,14 +6,16 @@ "private": true, "license": "MIT", "scripts": { + "format": "prettier --write \"src/**/*.ts\"", + "lint": "./node_modules/.bin/eslint ./src --ext .ts --quiet", + "lint:fix": "eslint src/**/*.ts --fix", + "type": "tsc --project tsconfig.json --noEmit", "prebuild": "rimraf dist", "build": "nest build", - "format": "prettier --write \"src/**/*.ts\"", "start": "nest start", "dev": "nest start --watch", "debug": "nest start --debug --watch", - "prod": "node dist/main", - "lint": "eslint src/**/*.ts --fix" + "prod": "node dist/main" }, "dependencies": { "@nestjs/common": "^9.0.0",