Skip to content

Commit 55d20d9

Browse files
committed
chore: codecov integration + publish ci
1 parent 0d98c9b commit 55d20d9

File tree

3 files changed

+38
-3
lines changed

3 files changed

+38
-3
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,11 @@ jobs:
2424
- name: Build
2525
run: npm run build
2626

27-
- name: Run tests
28-
run: npm test
27+
- name: Run tests with coverage
28+
run: npm run test:unit -- --coverage
29+
30+
- name: Upload coverage to Coveralls
31+
uses: coverallsapp/github-action@v2
32+
with:
33+
github-token: ${{ secrets.GITHUB_TOKEN }}
34+
path-to-lcov: ./coverage/lcov.info

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release to npm
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish-npm:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
14+
- name: Set up Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: 22
18+
registry-url: 'https://registry.npmjs.org/'
19+
20+
- name: Install dependencies
21+
run: npm ci
22+
23+
- name: Build
24+
run: npm run build
25+
26+
- name: Publish to npm
27+
run: npm publish --provenance --access public
28+
env:
29+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

src/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, expect, it } from 'vitest'
2-
import { indexedStringVariation, type GenOptions } from './index.js'
2+
import { type GenOptions, indexedStringVariation } from './index.js'
33

44
const cases: [string, GenOptions, string[]][] = [
55
[

0 commit comments

Comments
 (0)