diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..9f718460 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,22 @@ +name: Test +on: + push: + pull_request: + workflow_dispatch: + +jobs: + build: + name: Test build + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - run: npm i + - run: npm run build + + lint: + name: Check linting + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - run: npm i + - run: npm run lint diff --git a/package.json b/package.json index 5fa103c2..45d0b2bd 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "scripts": { "build": "ncc build src/main.ts --minify --out lib", "watch": "ncc build src/main.ts --watch --out lib", + "lint": "eslint --ext .ts src", "lint:fix": "eslint --ext .ts --fix src", "all-contributors-badge": "ts-node scripts/all-contributors-badge", "changelog": "ts-node scripts/changelog.ts",