Skip to content

Commit

Permalink
Matrix-Test for Node.JS versions
Browse files Browse the repository at this point in the history
Also disabled internal "Nester" cache for tests
  • Loading branch information
salwador committed Oct 10, 2024
1 parent 88d665d commit 2daaee5
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 7 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "Build & Test"

on:
push:
branches: [main]
pull_request:
branches: ['*']
workflow_dispatch:

jobs:
start:
name: Build & Test (Node.JS v${{ matrix.node }})
runs-on: ubuntu-latest

strategy:
matrix:
node: [ 22, 21, 20, 19, 18, 17, 16 ]

steps:
- name: Basic (1/1) - Checkout Project
uses: actions/checkout@v4

- name: Node.JS (1/2) - Installing
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: Node.JS (2/2) - NPM Modules Installing
run: |
npm install
- name: Build (1/2) - TypeScript Compilation
run: npm run build

- name: Build (2/2) - Launch Test
run: |
npm run test
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Nester
![Build & Test](https://github.com/bsnext/nester/actions/workflows/main.yml/badge.svg)
![Node.JS Supported](https://badgen.net/static/Node.JS/%3E=16.0.0/green)
![Install Size](https://badgen.net/packagephobia/install/@bsnext/nester)
![Dependencies](https://badgen.net/bundlephobia/dependency-count/@bsnext/nester)
![License](https://badgen.net/static/license/MIT/blue)

Short library for transform objects with "raw-string" keys.

```
Expand Down
2 changes: 1 addition & 1 deletion dist/test/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/test/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"example": "npm run build && node dist/example/index.js",
"start": "npm run build && node dist/index.js",
"test": "npm run build && node dist/test/index.js",
"bench": "npm run build && node dist/benchmark/index.js",
"example": "node dist/example/index.js",
"start": "node dist/index.js",
"test": "node dist/test/index.js",
"bench": "node dist/benchmark/index.js",
"build": "tsc --project tsconfig.json",
"watch": "tsc --watch"
},
Expand Down
2 changes: 1 addition & 1 deletion src/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as assert from 'uvu/assert';
////////////////////////////////

import Nester from '..';
const nester = new Nester(true);
const nester = new Nester();

////////////////////////////////

Expand Down

0 comments on commit 2daaee5

Please sign in to comment.