Compare commits
1 Commits
79aacde734
...
9ba650f17f
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ba650f17f |
9
.github/workflows/test.yml
vendored
9
.github/workflows/test.yml
vendored
@@ -31,11 +31,7 @@ jobs:
|
|||||||
- name: Run server tests
|
- name: Run server tests
|
||||||
run: |
|
run: |
|
||||||
cd ./test-server
|
cd ./test-server
|
||||||
if [ -f package.json ] && grep -q '"test"' package.json; then
|
npm test:unit
|
||||||
npm test
|
|
||||||
else
|
|
||||||
echo "⚠ No test script configured, skipping"
|
|
||||||
fi
|
|
||||||
|
|
||||||
test-php:
|
test-php:
|
||||||
name: Test PHP
|
name: Test PHP
|
||||||
@@ -80,7 +76,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
test -d ./test-server || exit 1
|
test -d ./test-server || exit 1
|
||||||
nginx -v
|
nginx -v
|
||||||
sudo systemctl status nginx --no-pager
|
# Verify nginx is running
|
||||||
|
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,23 +159,28 @@ 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 systemctl start nginx
|
sudo nginx || echo "nginx may already be running"
|
||||||
sudo systemctl status nginx --no-pager || true
|
# Verify nginx is working
|
||||||
|
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