Skip to content

Commit

Permalink
feat: added actions, readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
vwh committed Sep 28, 2024
1 parent 5f2c3ca commit 4cc8928
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 6 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
my-job:
name: Run Tests with Node
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Node
uses: actions/setup-node@v4

- name: Install dependencies
run: npm install

- name: Run Tests
run: npm run test
27 changes: 27 additions & 0 deletions .github/workflows/tsc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: TSC lint

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
my-job:
name: Run TSC
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Node
uses: actions/setup-node@v4

- name: Install dependencies
run: npm install

- name: Run Tests
run: npm run type-check
46 changes: 41 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
<a href="https://github.com/vwh/vwnode/actions/workflows/lint.yml">
<img src="https://github.com/vwh/vwnode/actions/workflows/lint.yml/badge.svg" alt="Lint Badge"/>
</a>
<a href="https://github.com/vwh/vwnode/actions/workflows/test.yml">
<img src="https://github.com/vwh/vwnode/actions/workflows/test.yml/badge.svg" alt="Test Badge"/>
</a>
</div>

## 🗃️ Project Structure
Expand All @@ -21,12 +24,13 @@
vw-node/
├── biome.json # Biome configuration
├── bun.lockb # Bun lockfile
├── nodemon.json # Nodemon configuration
├── Dockerfile # Docker configuration
├── package.json # Project metadata and dependencies
├── package-lock.json # npm lockfile
├── README.md # Project documentation
├── src/ # Source files
│ └── index.ts # Main TypeScript file
├── tests/ # Test files
├── tsconfig.json # TypeScript configuration
└── tsup.config.ts # tsup configuration
```
Expand Down Expand Up @@ -72,16 +76,16 @@ bun run build
npm run build
```

### 👀 Local
### 🚀 Start

Run the production build locally:
Run the production build:

```bash
# Using Bun
bun run local
bun run start

# Or using npm
npm run local
npm run start
```

### 🧹 Linting
Expand Down Expand Up @@ -118,6 +122,38 @@ bun run format:check
npm run format:check
```

### 🧐 Type Check

```bash
# Using Bun
bun run type-check

# Or using npm
npm run type-check
```

### 🐳 Docker

Build the Docker image:

```bash
# Using Bun
bun run docker:build

# Or using npm
npm run docker:build
```

Run the Docker image:

```bash
# Using Bun
bun run docker:run

# Or using npm
npm run docker:run
```

## 🤝 Contributing

Contributions are welcome! Feel free to open a pull request with your improvements or fixes.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"format": "biome format --write",
"type-check": "tsc --noEmit",
"docker:build": "docker build -t vwnode .",
"docker:run": "docker run -p 3000:3000 vwnode"
"docker:run": "docker run -p 3000:3000 vwnode"
},
"devDependencies": {
"@types/node": "latest",
Expand Down

0 comments on commit 4cc8928

Please sign in to comment.