Skip to content

Commit 188cd07

Browse files
committed
Add github-ci action for running tests-linting
1 parent a504dc8 commit 188cd07

File tree

2 files changed

+50
-1
lines changed

2 files changed

+50
-1
lines changed

.github/workflows/test-lint.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Test and lint
2+
3+
on:
4+
push:
5+
branches: ['*']
6+
paths-ignore:
7+
- '**/*.md' # Ignore changes to markdown files
8+
pull_request:
9+
branches:
10+
- main
11+
paths-ignore:
12+
- '**/*.md' # Ignore changes to markdown files
13+
14+
jobs:
15+
test-lint:
16+
environment: Github CI
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
25+
- name: Install bun for deployment
26+
uses: oven-sh/setup-bun@v2
27+
with:
28+
bun-version: latest
29+
30+
# lib lint/check/test
31+
- name: Install deps
32+
working-directory: ./packages/litlytics
33+
run: bun install
34+
35+
- name: Run lib typecheck
36+
working-directory: ./packages/litlytics
37+
run: bun run typecheck
38+
39+
- name: Run lib tests
40+
working-directory: ./packages/litlytics
41+
run: bun run test:ci
42+
43+
# main app lint/check/test
44+
- name: Run app eslint
45+
run: bun run lint
46+
47+
- name: Run app typecheck
48+
run: bun run typecheck

packages/litlytics/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"type": "module",
66
"scripts": {
77
"typecheck": "tsc",
8-
"test": "vitest"
8+
"test": "vitest",
9+
"test:ci": "vitest --coverage --run"
910
},
1011
"devDependencies": {
1112
"@types/bun": "latest",

0 commit comments

Comments
 (0)