Skip to content

Commit

Permalink
CI update
Browse files Browse the repository at this point in the history
  • Loading branch information
JrMasterModelBuilder committed Nov 5, 2023
1 parent b8826e5 commit c15269e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 12 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,28 @@ jobs:
config:
- runs-on: ubuntu-latest
node-version: '18.12.0' # LTS
CODE_TEST: 'test-legacy'

- runs-on: ubuntu-latest
node-version: '18.18.0' # LTS (current)
node-version: '18.18.2' # LTS
CODE_TEST: 'test-legacy'

- runs-on: ubuntu-latest
node-version: '20.9.0' # LTS (current)
CODE_TEST: 'test-legacy'
CODE_CHECK: 1

- runs-on: macos-latest
node-version: '18.18.0' # LTS (current)
node-version: '20.9.0' # LTS (current)
CODE_TEST: 'test-legacy'

- runs-on: windows-latest
node-version: '18.18.0' # LTS (current)
node-version: '20.9.0' # LTS (current)
CODE_TEST: 'test-legacy'

- runs-on: ubuntu-latest
node-version: '20.8.0'
node-version: '21.1.0' # Latest
CODE_TEST: 'test'

runs-on: ${{ matrix.config.runs-on }}

Expand All @@ -42,11 +51,11 @@ jobs:
- name: Build
run: npm run build

- name: Test CJS
run: npm run test:cjs

- name: Test ESM
run: npm run test:esm
run: npm run ${{ matrix.config.CODE_TEST }}:esm

- name: Test CJS
run: npm run ${{ matrix.config.CODE_TEST }}:cjs

- name: Lint
run: npm run lint
Expand All @@ -69,7 +78,7 @@ jobs:
- name: Node
uses: actions/setup-node@v3
with:
node-version: '18.18.0'
node-version: '20.9.0'
registry-url: https://registry.npmjs.org/

- name: Dependencies
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.18.0
20.9.0
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,15 @@
"build:esm": "babel --env-name esm -x .ts -s true -d esm --out-file-extension .mjs src",
"build:cjs": "babel --env-name cjs -x .ts -s true -d cjs --out-file-extension .js src",
"build": "npm run build:dts && npm run build:esm && npm run build:cjs",
"test:esm": "node -r source-map-support/register --test esm",
"test:cjs": "node -r source-map-support/register --test cjs",
"test-legacy:esm": "node -r source-map-support/register --test esm",
"test-legacy:cjs": "node -r source-map-support/register --test cjs",
"test-legacy": "npm run test-legacy:esm && npm run test-legacy:cjs",
"test:esm": "node -r source-map-support/register --test 'esm/**/*.mjs'",
"test:cjs": "node -r source-map-support/register --test 'cjs/**/*.js'",
"test": "npm run test:esm && npm run test:cjs",
"all-legacy:esm": "npm run clean && npm run build:esm && npm run test-legacy:esm && npm run lint && npm run formatted",
"all-legacy:cjs": "npm run clean && npm run build:cjs && npm run test-legacy:cjs && npm run lint && npm run formatted",
"all-legacy": "npm run clean && npm run build && npm run test-legacy && npm run lint && npm run formatted",
"all:esm": "npm run clean && npm run build:esm && npm run test:esm && npm run lint && npm run formatted",
"all:cjs": "npm run clean && npm run build:cjs && npm run test:cjs && npm run lint && npm run formatted",
"all": "npm run clean && npm run build && npm run test && npm run lint && npm run formatted",
Expand Down

0 comments on commit c15269e

Please sign in to comment.