Add two separate builds #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Build external case | |
run: node build-ext.mjs | |
- name: Build internal case | |
run: node build.mjs | |
- name: Remove node_modules | |
run: rm -rf node_modules | |
- name: Run without the shelljs module as external | |
run: node dist/index.js | |
- name: Run with the shelljs module as external | |
run: node dist/index-ext.js | |
if: failure() |