Skip to content

Commit 2f877da

Browse files
committed
feat: added CI, updated package manager to pnpm, sanitized directory
1 parent 7ae0c30 commit 2f877da

File tree

13 files changed

+2701
-4186
lines changed

13 files changed

+2701
-4186
lines changed

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 15 # never let a hung Playwright job eat our runners
12+
13+
steps:
14+
# 1 > checkout code
15+
- uses: actions/checkout@v4
16+
17+
# 2 > install pnpm 10.12.1 (same as packageManager field)
18+
- uses: pnpm/action-setup@v3
19+
with:
20+
version: 10.12.1
21+
run_install: false # we'll call pnpm install ourselves
22+
23+
# 3 > set up Node 20 + cache the global pnpm store
24+
- uses: actions/setup-node@v4
25+
with:
26+
node-version: 20
27+
cache: pnpm
28+
29+
# 4 > install all workspace deps deterministically
30+
- name: Install dependencies
31+
run: pnpm install --frozen-lockfile
32+
33+
# 5 > lint
34+
- name: Lint
35+
run: pnpm lint
36+
37+
# 6 > pack core and inject tarball into demo fixtures
38+
- name: Pack core tarball
39+
run: pnpm run prepack:core # builds .tgz in ./dist
40+
- name: Inject tarball into fixtures
41+
run: node scripts/install-local-tarball.js # script injects .tgz into demo fixtures
42+
43+
# 7 > run full unit + Playwright suite
44+
- name: Run tests
45+
run: pnpm test # resolves to core's "test" → test:all
46+
47+
# 8 > upload Playwright traces on failure
48+
- name: Upload Playwright traces on failure
49+
if: failure()
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: playwright-traces
53+
path: packages/core/__tests__/test-results/

.github/workflows/release.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main] # run after CI passes & merge lands
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
issues: write
12+
13+
jobs:
14+
release:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: google-github-actions/release-please-action@v4
19+
with:
20+
release-type: node
21+
include-component-in-tag: true

.gitignore

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1+
# package artifacts
12
node_modules/
2-
npm-debug.log
3-
yarn-error.log
3+
.next/
4+
dist/
45
coverage/
5-
t.py
6-
*.tgz
7-
.tgz
6+
test-results/
7+
.pnpm-store/
8+
9+
# logs / temp files
10+
npm-debug.log*
11+
yarn-error.log*
812
.DS_Store
9-
.vscode/
10-
package-lock.json
1113

12-
.next/
13-
.git.
14+
# IDE/editor
15+
.vscode/
1416

15-
test-results/
17+
# tarballs produced during local tests
18+
*.tgz
1619

17-
todo.md
20+
# local scratch files
21+
t.py
22+
todo.md

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
[![npm version](https://img.shields.io/npm/v/@austinserb/react-zero-ui)](https://www.npmjs.com/package/@austinserb/react-zero-ui)
66
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7+
![CI](https://github.com/austin1serb/react-zero-ui/actions/workflows/ci.yaml/badge.svg)
78

89
## Why Zero-UI?
910

0 commit comments

Comments
 (0)