diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 0000000..b49ea91 --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,27 @@ +name: Build & Test + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x, 13.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: npm ci + - run: npm run build --if-present + - run: npm test + env: + CI: true diff --git a/package.json b/package.json index f3e6164..1b93128 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,8 @@ "build": "rm -rf dist && tsc -p tsconfig.json", "precommit": "lint-staged", "prepublish:npm": "npm run build", - "publish:npm": "npm publish --access public" + "publish:npm": "npm publish --access public", + "test": "" }, "dependencies": { "telegraf": "3.36.0"