diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000..7120d2a --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,37 @@ +name: Pull Request + +on: pull_request + +jobs: + install: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + ## This step installs node and sets up several matchers (regex matching for Github Annotations). See + ## https://github.com/actions/setup-node/blob/25316bbc1f10ac9d8798711f44914b1cf3c4e954/src/main.ts#L58-L65 + - uses: actions/setup-node@v3 + with: + node-version: 16.x + registry-url: https://registry.npmjs.org + + - name: Install Packages + shell: bash + run: npm install --production=false + + check: + runs-on: ubuntu-latest + needs: 'install' + + steps: + - name: Lint + shell: bash + run: npm run lint + + - name: Type Check + shell: bash + run: npm run typecheck + + - name: Run Unit Tests + shell: bash + run: npm test diff --git a/.gitignore b/.gitignore index 5afd233..47e6f67 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ dist tmp /out-tsc +*.tsbuildinfo # dependencies node_modules diff --git a/package.json b/package.json index 5117014..bfd229d 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "precommit": "lint-staged", "prepare": "husky install", "test": "jest -c jest.config.ts", - "tokens-config": "ts-node scripts/tokens-config" + "tokens-config": "ts-node scripts/tokens-config", + "typecheck": "tsc -p . --noEmit" }, "devDependencies": { "@commitlint/cli": "^17.6.3",