From 1b662324e9df1a5c1d814a56946d49cfdc87f53c Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Sat, 29 Jan 2022 17:38:42 +0000 Subject: [PATCH] Add GitHub Actions Signed-off-by: Ethan Lane --- .github/workflows/linting.yml | 27 +++++++++++++++++++++++++++ .github/workflows/testing.yml | 27 +++++++++++++++++++++++++++ package.json | 3 ++- 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/linting.yml create mode 100644 .github/workflows/testing.yml 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",