-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
1,611 additions
and
822 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,56 @@ | ||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | ||
|
||
name: Node.js CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
|
||
node-tests: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
|
||
strategy: | ||
matrix: | ||
node-version: [22.x, 20.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
node-version: [22.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: oven-sh/setup-bun@v1 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- run: sudo apt install python3 | ||
- run: sudo apt install php-cli | ||
- run: npm install | ||
- run: npm run test:e2e | ||
- run: npm run test:unit | ||
- name: Install Python | ||
run: sudo apt install python3 | ||
- name: Install PHP CLI | ||
run: sudo apt install php-cli | ||
- name: Install Node.js dependencies | ||
run: npm install | ||
- name: Run end-to-end tests | ||
run: npm run test:e2e | ||
- name: Run unit tests | ||
run: npm run test:unit | ||
|
||
bun-tests: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Remove Node.js installed by setup-node action (if any) | ||
run: | | ||
if command -v node &> /dev/null; then | ||
sudo rm -rf "$(which node)" | ||
fi | ||
if command -v npm &> /dev/null; then | ||
sudo rm -rf "$(which npm)" | ||
fi | ||
- name: Setup Bun | ||
uses: oven-sh/setup-bun@v1 | ||
- name: Install dependencies using Bun | ||
run: bun install | ||
- name: Run end-to-end tests with Bun | ||
run: bun run test:e2e | ||
- name: Run unit tests with Bun | ||
run: bun run test:unit |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
#!/usr/bin/env node | ||
#!/bin/sh - | ||
':' /*- | ||
bun=$(bun --version 2>&1) && exec bun "$0" "$@" | ||
node=$(node --version 2>&1) && exec node "$0" "$@" | ||
*/ | ||
|
||
require('../lib/binaries/CLI.js'); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
#!/usr/bin/env node | ||
#!/bin/sh - | ||
':' /*- | ||
bun=$(bun --version 2>&1) && exec bun "$0" "$@" | ||
node=$(node --version 2>&1) && exec node "$0" "$@" | ||
*/ | ||
|
||
require('../lib/binaries/DevCLI.js'); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
#!/usr/bin/env node | ||
#!/bin/sh - | ||
':' /*- | ||
bun=$(bun --version 2>&1) && exec bun "$0" "$@" | ||
node=$(node --version 2>&1) && exec node "$0" "$@" | ||
*/ | ||
|
||
require('../lib/binaries/Runtime4Docker.js'); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
#!/usr/bin/env node | ||
#!/bin/sh - | ||
':' /*- | ||
bun=$(bun --version 2>&1) && exec bun "$0" "$@" | ||
node=$(node --version 2>&1) && exec node "$0" "$@" | ||
*/ | ||
|
||
require('../lib/binaries/Runtime4Docker.js'); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env node | ||
|
||
require('../lib/binaries/CLI.js'); |
Oops, something went wrong.