diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0d81f2d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,92 @@ +name: CI + +on: + pull_request: + branches: [main] + push: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + run_install: false + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 24 + cache: "pnpm" + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Run Linter + run: pnpm run lint + + test: + name: Unit & Integration Tests (Node ${{ matrix.node-version }}) + needs: lint + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [22, 24] + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + run_install: false + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Run Tests + run: pnpm test + + build: + name: Build & Verify + needs: [lint, test] + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + run_install: false + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 24 + cache: "pnpm" + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build Project + run: pnpm run build + + - name: Verify Examples + run: node examples/automate.js diff --git a/package.json b/package.json index 4052f7b..0662029 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "name": "volten", + "packageManager": "pnpm@11.0.0", "version": "0.1.0", "description": "A 0-dependency Node.js HTTP framework that is simple, modern, and fast.", "author": "insanerx",