Compare commits
1 Commits
9ba650f17f
...
79aacde734
| Author | SHA1 | Date | |
|---|---|---|---|
| 79aacde734 |
9
.github/workflows/test.yml
vendored
9
.github/workflows/test.yml
vendored
@@ -31,7 +31,11 @@ jobs:
|
|||||||
- name: Run server tests
|
- name: Run server tests
|
||||||
run: |
|
run: |
|
||||||
cd ./test-server
|
cd ./test-server
|
||||||
npm test:unit
|
if [ -f package.json ] && grep -q '"test"' package.json; then
|
||||||
|
npm test
|
||||||
|
else
|
||||||
|
echo "⚠ No test script configured, skipping"
|
||||||
|
fi
|
||||||
|
|
||||||
test-php:
|
test-php:
|
||||||
name: Test PHP
|
name: Test PHP
|
||||||
@@ -76,8 +80,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
test -d ./test-server || exit 1
|
test -d ./test-server || exit 1
|
||||||
nginx -v
|
nginx -v
|
||||||
# Verify nginx is running
|
sudo systemctl status nginx --no-pager
|
||||||
pgrep nginx || exit 1
|
|
||||||
chmod +x ./scripts/health-check.sh
|
chmod +x ./scripts/health-check.sh
|
||||||
./scripts/health-check.sh ./test-server false false true
|
./scripts/health-check.sh ./test-server false false true
|
||||||
echo "✓ nginx installation successful"
|
echo "✓ nginx installation successful"
|
||||||
|
|||||||
15
action.yml
15
action.yml
@@ -159,28 +159,23 @@ runs:
|
|||||||
if [ -f "${{ inputs.nginx-config }}" ]; then
|
if [ -f "${{ inputs.nginx-config }}" ]; then
|
||||||
sudo cp "${{ inputs.nginx-config }}" /etc/nginx/sites-available/default
|
sudo cp "${{ inputs.nginx-config }}" /etc/nginx/sites-available/default
|
||||||
sudo nginx -t
|
sudo nginx -t
|
||||||
|
sudo systemctl reload nginx
|
||||||
echo "nginx configured successfully"
|
echo "nginx configured successfully"
|
||||||
else
|
else
|
||||||
echo "::warning::nginx config file not found: ${{ inputs.nginx-config }}"
|
echo "::warning::nginx config file not found: ${{ inputs.nginx-config }}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "::endgroup:"
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Start nginx
|
- name: Start nginx
|
||||||
if: inputs.install-nginx == 'true'
|
if: inputs.install-nginx == 'true'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "::group::Starting nginx"
|
echo "::group::Starting nginx"
|
||||||
sudo nginx || echo "nginx may already be running"
|
sudo systemctl start nginx
|
||||||
# Verify nginx is working
|
sudo systemctl status nginx --no-pager || true
|
||||||
if sudo nginx -t 2>/dev/null; then
|
|
||||||
echo "✓ nginx configuration valid"
|
|
||||||
fi
|
|
||||||
if pgrep nginx >/dev/null; then
|
|
||||||
echo "✓ nginx is running"
|
|
||||||
fi
|
|
||||||
echo "nginx started successfully"
|
echo "nginx started successfully"
|
||||||
echo "::endgroup:"
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Install Node.js dependencies
|
- name: Install Node.js dependencies
|
||||||
if: inputs.install-node == 'true' && inputs.install-dependencies == 'true'
|
if: inputs.install-node == 'true' && inputs.install-dependencies == 'true'
|
||||||
|
|||||||
Reference in New Issue
Block a user