diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..ff225d9 --- /dev/null +++ b/.github/workflows/test.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/tsc.yml b/.github/workflows/tsc.yml new file mode 100644 index 0000000..de31d91 --- /dev/null +++ b/.github/workflows/tsc.yml @@ -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 \ No newline at end of file diff --git a/README.md b/README.md index c32a6a9..eb484e7 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,9 @@ Lint Badge + + Test Badge + ## ๐Ÿ—ƒ๏ธ Project Structure @@ -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 ``` @@ -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 @@ -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. diff --git a/package.json b/package.json index 4ef7a49..ef26014 100644 --- a/package.json +++ b/package.json @@ -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",