Skip to content

Commit

Permalink
Add test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanduplenskikh committed Nov 13, 2024
1 parent b4e27fb commit a5efcb4
Show file tree
Hide file tree
Showing 6 changed files with 952 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test

on:
push:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm install
- name: Run without the shelljs module as external
run: npm run start
- name: Run with the shelljs module as external
run: npm run start-ext
if: failure()
11 changes: 11 additions & 0 deletions build-ext.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { build } from 'esbuild'

await build({
entryPoints: ['./src/index.js'],
outfile: './dist/index.js',
bundle: true,
platform: "node",
target: "node16",
allowOverwrite: true,
external: ['shelljs']
});
10 changes: 10 additions & 0 deletions build.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { build } from 'esbuild'

await build({
entryPoints: ['./src/index.js'],
outfile: './dist/index.js',
bundle: true,
platform: "node",
target: "node16",
allowOverwrite: true
});
Loading

0 comments on commit a5efcb4

Please sign in to comment.