Skip to content

Commit caedb8e

Browse files
committed
add test workflow
Signed-off-by: rishichawda <[email protected]>
1 parent 1f726fe commit caedb8e

File tree

2 files changed

+75
-1
lines changed

2 files changed

+75
-1
lines changed

.github/workflows/test.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
paths:
7+
- 'lib/**'
8+
- 'index.ts'
9+
- 'styles.css'
10+
- 'package.json'
11+
- '__tests__/**'
12+
- 'tsconfig.json'
13+
- '.github/workflows/test.yml'
14+
push:
15+
branches: [main]
16+
paths:
17+
- 'lib/**'
18+
- 'index.ts'
19+
- 'styles.css'
20+
- 'package.json'
21+
- '__tests__/**'
22+
- 'tsconfig.json'
23+
- '.github/workflows/test.yml'
24+
25+
jobs:
26+
test:
27+
runs-on: ubuntu-latest
28+
strategy:
29+
matrix:
30+
node-version: [18, 20, 22]
31+
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v4
35+
36+
- name: Setup Node.js ${{ matrix.node-version }}
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: ${{ matrix.node-version }}
40+
cache: 'yarn'
41+
42+
- name: Install dependencies
43+
run: yarn install --frozen-lockfile
44+
45+
- name: Build package
46+
run: yarn build
47+
48+
- name: Run all tests
49+
run: yarn test:all
50+
51+
- name: Check for TypeScript errors
52+
run: yarn build:ts
53+
54+
lint:
55+
runs-on: ubuntu-latest
56+
57+
steps:
58+
- name: Checkout
59+
uses: actions/checkout@v4
60+
61+
- name: Setup Node.js
62+
uses: actions/setup-node@v4
63+
with:
64+
node-version: '22'
65+
cache: 'yarn'
66+
67+
- name: Install dependencies
68+
run: yarn install --frozen-lockfile
69+
70+
- name: Build package
71+
run: yarn build
72+
73+
- name: Check TypeScript types
74+
run: yarn build:ts --noEmit

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A powerful TypeScript remark plugin that transforms markdown blockquotes into beautifully styled note elements. Add professional-looking notes, tips, quotes, and more to your markdown documentation with minimal effort!
44

5-
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/rishichawda/remark-notes-plugin/release.yml)
5+
![Test Status](https://img.shields.io/github/actions/workflow/status/rishichawda/remark-notes-plugin/test.yml?branch=main&label=tests)
66
![npm](https://img.shields.io/npm/v/remark-notes-plugin)
77
![License](https://img.shields.io/npm/l/remark-notes-plugin)
88
![Website](https://img.shields.io/website?url=https%3A%2F%2Frishichawda.github.io%2Fremark-notes-plugin)

0 commit comments

Comments
 (0)