Skip to content

Commit 3b4005e

Browse files
authored
Merge pull request #1 from FoxNoseTech/setup-ci
Add CI/CD workflows
2 parents fdc78cf + b33836f commit 3b4005e

5 files changed

Lines changed: 55 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
node-version: [18, 20, 22]
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: pnpm/action-setup@v4
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
cache: pnpm
22+
- run: pnpm install --frozen-lockfile
23+
- run: pnpm lint
24+
- run: pnpm typecheck
25+
- run: pnpm test:coverage
26+
- if: matrix.node-version == 20
27+
uses: codecov/codecov-action@v5
28+
with:
29+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/publish.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: pnpm/action-setup@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: 20
16+
registry-url: https://registry.npmjs.org
17+
cache: pnpm
18+
- run: pnpm install --frozen-lockfile
19+
- run: pnpm test
20+
- run: pnpm build
21+
- run: npm publish --access public
22+
env:
23+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ coverage/
66
.env
77
.env.local
88
*.log
9+
.claude/

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"type": "git",
5151
"url": "https://github.com/foxnose/ts-sdk.git"
5252
},
53+
"packageManager": "pnpm@10.29.2",
5354
"homepage": "https://foxnose.net",
5455
"devDependencies": {
5556
"@types/node": "^20.0.0",

vitest.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export default defineConfig({
77
include: ['tests/**/*.test.ts'],
88
coverage: {
99
provider: 'v8',
10+
reporter: ['text', 'json', 'lcov'],
1011
include: ['src/**/*.ts'],
1112
exclude: ['src/**/index.ts'],
1213
thresholds: {

0 commit comments

Comments
 (0)