diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 0000000..97b54f4 --- /dev/null +++ b/.github/workflows/linting.yml @@ -0,0 +1,27 @@ +name: Linting + +on: + pull_request: + branches: + - main + - develop + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [16.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install + - run: yarn build + - run: yarn lint + diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml new file mode 100644 index 0000000..6654e30 --- /dev/null +++ b/.github/workflows/testing.yml @@ -0,0 +1,27 @@ +name: Testing + +on: + pull_request: + branches: + - main + - develop + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x, 14.x, 16.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install + - run: yarn build + - run: yarn test --coverage + diff --git a/package.json b/package.json index 11f91d3..58ef572 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "scripts": { "build": "tsc", "start": "node ./dist/vylbot", - "test": "jest" + "test": "jest", + "lint": "eslint ." }, "repository": { "type": "git",