Skip to content

Commit

Permalink
chore: Add pull request action
Browse files Browse the repository at this point in the history
  • Loading branch information
alanbsmith committed Sep 2, 2023
1 parent 68e3c4d commit b806fc5
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
dist
tmp
/out-tsc
*.tsbuildinfo

# dependencies
node_modules
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit b806fc5

Please sign in to comment.