Skip to content

Commit

Permalink
ci: add build test
Browse files Browse the repository at this point in the history
  • Loading branch information
wellwelwel committed Jul 18, 2024
1 parent cbef840 commit 76b2acd
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 29 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ci_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: '🧑🏻‍🍳 CI — Build'

on:
push:
branches:
- 'main'
pull_request:
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: false
name: Check
steps:
- name: ➕ Actions - Checkout
uses: actions/checkout@v4

- name: ➕ Actions - Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'

- name: ➕ Cache dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-linux-${{ hashFiles('package-lock.json') }}
restore-keys: npm-linux-

- name: 📦 Installing Dependencies
run: npm ci

- name: 🤹🏻‍♀️ TypeScript Build
run: npm run build
30 changes: 1 addition & 29 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,38 +47,10 @@ It's better to discuss an **API** before actually start implementing it. You can

## Testing

### General (recommended)

#### Sequential and Parallel

```sh
npm run test # Test with the locally installed Node.js version
npm run test:bun # Test with the locally installed Bun version
npm run test:deno # Test with the locally installed Deno version
```

#### Sequential

```sh
npm run test:sequential # Test with the locally installed Node.js version
npm run test:bun:sequential # Test with the locally installed Bun version
npm run test:deno:sequential # Test with the locally installed Deno version
```

> Pass custom flags using `--`, for example:
>
> ```sh
> npm run test:sequential -- --debug --watch # etc.
> ```
>
> - Same for **Bun** and **Deno**.
#### Parallel
```sh
npm run test:node
bun run test:bun
desno task test:deno
deno task test:deno
```

---
Expand Down

0 comments on commit 76b2acd

Please sign in to comment.