Compare commits

..

1 Commits

Author SHA1 Message Date
58cd5d025e chore: update name
Some checks failed
Test Action / Test PHP (pull_request) Failing after 11s
Test Action / Test Without Dependencies (pull_request) Failing after 6s
Test Action / Test Node (pull_request) Failing after 21s
Test Action / Test Custom Server Path (pull_request) Failing after 19s
Test Action / Test Build Command (pull_request) Failing after 17s
Test Action / Test All Components (pull_request) Failing after 31s
Test Action / Test nginx (pull_request) Failing after 54s
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
2026-02-14 17:30:02 -05:00
2 changed files with 41 additions and 39 deletions

View File

@@ -146,6 +146,30 @@ jobs:
echo "⚠ No test script configured, skipping" echo "⚠ No test script configured, skipping"
fi fi
test-without-dependencies:
name: Test Without Dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
- name: Test action without installing dependencies
uses: ./
with:
install-node: 'true'
install-dependencies: 'false'
server-path: './test-server'
- name: Verify installation
run: |
test -d ./test-server || exit 1
node --version
# node_modules should not exist since we skipped dependency installation
if [ -d ./test-server/node_modules ]; then
echo "✗ Dependencies were installed when they shouldn't have been"
exit 1
fi
echo "✓ Installation without dependencies successful"
test-build-command: test-build-command:
name: Test Build Command name: Test Build Command
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@@ -51,22 +51,6 @@ inputs:
description: 'Custom script to run after installation' description: 'Custom script to run after installation'
required: false required: false
default: '' default: ''
server-repository:
description: 'Repository to checkout for the server source'
required: false
default: 'Nodarx/server'
server-ref:
description: 'Branch, tag, or SHA to checkout for the server repository'
required: false
default: 'main'
github-server-url:
description: 'Git server base URL for checkout (e.g. https://git.ktrix.dev)'
required: false
default: 'https://git.ktrix.dev'
checkout-token:
description: 'Optional token for private/external repository checkout'
required: false
default: ''
outputs: outputs:
install-status: install-status:
@@ -109,28 +93,22 @@ runs:
echo "Install dependencies: ${{ inputs.install-dependencies }}" echo "Install dependencies: ${{ inputs.install-dependencies }}"
echo "::endgroup::" echo "::endgroup::"
- name: Checkout server repository (public/no token) - name: Clone server repository
if: inputs.checkout-token == '' shell: bash
uses: actions/checkout@v4 run: |
with: echo "::group::Cloning Nodarx server repository"
repository: ${{ inputs.server-repository }}
ref: ${{ inputs.server-ref }}
path: ${{ inputs.server-path }}
fetch-depth: 1
submodules: recursive
github-server-url: ${{ inputs.github-server-url }}
- name: Checkout server repository (with token) if [ -d "${{ inputs.server-path }}" ]; then
if: inputs.checkout-token != '' echo "Directory exists, pulling latest changes..."
uses: actions/checkout@v4 cd "${{ inputs.server-path }}"
with: git pull --recurse-submodules || echo "::warning::Pull failed, continuing with existing code"
repository: ${{ inputs.server-repository }} else
ref: ${{ inputs.server-ref }} echo "Cloning repository..."
path: ${{ inputs.server-path }} git clone --recurse-submodules --depth 1 https://git.ktrix.dev/Nodarx/server "${{ inputs.server-path }}"
fetch-depth: 1 fi
submodules: recursive
github-server-url: ${{ inputs.github-server-url }} echo "Repository cloned/updated successfully"
token: ${{ inputs.checkout-token }} echo "::endgroup::"
- name: Setup Node - name: Setup Node
if: inputs.install-node == 'true' if: inputs.install-node == 'true'
@@ -140,7 +118,7 @@ runs:
- name: Setup PHP - name: Setup PHP
if: inputs.install-php == 'true' if: inputs.install-php == 'true'
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2.36.0
with: with:
php-version: ${{ inputs.php-version }} php-version: ${{ inputs.php-version }}
extensions: ${{ inputs.php-extensions }} extensions: ${{ inputs.php-extensions }}