Skip to content

Commit 2d34179

Browse files
committed
configure github actions
1 parent e153773 commit 2d34179

File tree

4 files changed

+2507
-2019
lines changed

4 files changed

+2507
-2019
lines changed

.github/workflows/pr.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: PR CI
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- main
7+
- staging
8+
- production
9+
jobs:
10+
format_and_test:
11+
name: Format and Test
12+
permissions:
13+
contents: read
14+
actions: read
15+
pull-requests: write
16+
checks: write
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
- name: Install asdf & tools
23+
uses: asdf-vm/actions/install@v3
24+
- name: asdf cache
25+
id: asdf-cache
26+
uses: actions/cache@v4
27+
with:
28+
path: ~/.asdf/
29+
key: ${{ runner.os }}-${{ hashFiles('**/.tool-versions') }}
30+
- name: Get pnpm store directory
31+
id: pnpm_cache
32+
shell: bash
33+
run: |
34+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
35+
- uses: actions/cache@v4
36+
name: Setup pnpm cache
37+
with:
38+
path: ${{ env.STORE_PATH }}
39+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
40+
restore-keys: |
41+
${{ runner.os }}-pnpm-store-
42+
- name: Install dependencies
43+
run: pnpm install --frozen-lockfile
44+
if: steps.npm_cache.outputs.cache-hit != 'true'
45+
- run: pnpm build
46+
- run: pnpm lint
47+
- run: pnpm test:coverage

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,6 @@ coverage/
4040

4141
# Optional: OS-specific files
4242
Thumbs.db
43+
44+
*.tsbuildinfo
45+

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"start": "node dist/app.js",
88
"dev": "tsx --watch src/app.ts",
9-
"build": "tsc",
9+
"build": "tsc --project tsconfig.app.json",
1010
"lint": "eslint src",
1111
"test": "vitest",
1212
"test:coverage": "vitest run --coverage"
@@ -15,6 +15,7 @@
1515
"author": "Dan Pickett",
1616
"license": "MIT",
1717
"dependencies": {
18+
"body-parser": "^1.20.3",
1819
"dotenv": "^16.4.5",
1920
"express": "^4.21.1",
2021
"pino": "^9.5.0",
@@ -23,6 +24,7 @@
2324
},
2425
"devDependencies": {
2526
"@launchware/eslint-config-node": "^0.2.0",
27+
"@types/body-parser": "^1.19.5",
2628
"@types/express": "^5.0.0",
2729
"@types/node": "^22.9.0",
2830
"@typescript-eslint/eslint-plugin": "^8.13.0",

0 commit comments

Comments
 (0)