Compare commits
1 Commits
main
..
13f2e53360
| Author | SHA1 | Date | |
|---|---|---|---|
| 13f2e53360 |
+50
-18
@@ -23,7 +23,6 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Test action with Node.js (npm)
|
- name: Test action with Node.js (npm)
|
||||||
id: install
|
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
install-node: 'true'
|
install-node: 'true'
|
||||||
@@ -40,10 +39,13 @@ jobs:
|
|||||||
test -d ./test-server/node_modules || exit 1
|
test -d ./test-server/node_modules || exit 1
|
||||||
chmod +x ./scripts/health-check.sh
|
chmod +x ./scripts/health-check.sh
|
||||||
./scripts/health-check.sh ./test-server true false false
|
./scripts/health-check.sh ./test-server true false false
|
||||||
test "${{ steps.install.outputs.install-status }}" = "success"
|
|
||||||
test "${{ steps.install.outputs.node-installed }}" = "true"
|
|
||||||
echo "✓ Node.js (npm) installation successful"
|
echo "✓ Node.js (npm) installation successful"
|
||||||
|
|
||||||
|
- name: Run server tests
|
||||||
|
run: |
|
||||||
|
cd ./test-server
|
||||||
|
npm run test:unit
|
||||||
|
|
||||||
test-php:
|
test-php:
|
||||||
name: Test PHP
|
name: Test PHP
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -53,7 +55,6 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Test action with PHP
|
- name: Test action with PHP
|
||||||
id: install
|
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
install-php: 'true'
|
install-php: 'true'
|
||||||
@@ -71,13 +72,19 @@ jobs:
|
|||||||
composer --version
|
composer --version
|
||||||
chmod +x ./scripts/health-check.sh
|
chmod +x ./scripts/health-check.sh
|
||||||
./scripts/health-check.sh ./test-server false true false
|
./scripts/health-check.sh ./test-server false true false
|
||||||
test "${{ steps.install.outputs.install-status }}" = "success"
|
|
||||||
test "${{ steps.install.outputs.php-installed }}" = "true"
|
|
||||||
echo "✓ PHP installation successful"
|
echo "✓ PHP installation successful"
|
||||||
|
|
||||||
|
- name: Run server tests
|
||||||
|
run: |
|
||||||
|
cd ./test-server
|
||||||
|
composer test:unit
|
||||||
|
|
||||||
test-database-config:
|
test-database-config:
|
||||||
name: Test Database Configuration
|
name: Test Database Configuration
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
services:
|
||||||
|
mongo:
|
||||||
|
image: mongo:7
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@@ -112,6 +119,11 @@ jobs:
|
|||||||
'
|
'
|
||||||
echo "✓ Database configuration verified"
|
echo "✓ Database configuration verified"
|
||||||
|
|
||||||
|
- name: Verify database is reachable with configured settings
|
||||||
|
run: |
|
||||||
|
cd ./test-server
|
||||||
|
php bin/console tenant:list
|
||||||
|
|
||||||
test-base-modules:
|
test-base-modules:
|
||||||
name: Test Base Modules Installation
|
name: Test Base Modules Installation
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -124,7 +136,6 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Test action with base modules
|
- name: Test action with base modules
|
||||||
id: install
|
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
install-php: 'true'
|
install-php: 'true'
|
||||||
@@ -140,11 +151,22 @@ jobs:
|
|||||||
|
|
||||||
- name: Verify password authentication provider is installed and enabled
|
- name: Verify password authentication provider is installed and enabled
|
||||||
run: |
|
run: |
|
||||||
test -d ./test-server/modules/authentication_provider_password
|
cd ./test-server
|
||||||
test "${{ steps.install.outputs.install-status }}" = "success"
|
OUTPUT=$(php bin/console module:list)
|
||||||
test "${{ steps.install.outputs.base-modules-installed }}" = "true"
|
echo "$OUTPUT"
|
||||||
|
echo "$OUTPUT" | grep -q "authentication_provider_password" || { echo "::error::authentication_provider_password not found in module list"; exit 1; }
|
||||||
|
echo "$OUTPUT" | grep "authentication_provider_password" | grep -q "Enabled" || { echo "::error::authentication_provider_password is not enabled"; exit 1; }
|
||||||
echo "✓ authentication_provider_password is installed and enabled"
|
echo "✓ authentication_provider_password is installed and enabled"
|
||||||
|
|
||||||
|
- name: Verify a tenant and user can be provisioned end-to-end
|
||||||
|
run: |
|
||||||
|
cd ./test-server
|
||||||
|
php bin/console tenant:create ci.test --identifier ci_smoke
|
||||||
|
php bin/console user:create ci_smoke tester@ci.test
|
||||||
|
php bin/console user:password ci_smoke tester@ci.test 'Sup3r-Secret!'
|
||||||
|
php bin/console user:list ci_smoke | grep -q "tester@ci.test" || { echo "::error::provisioned user not found"; exit 1; }
|
||||||
|
echo "✓ tenant and user provisioning verified"
|
||||||
|
|
||||||
test-base-modules-requires-php:
|
test-base-modules-requires-php:
|
||||||
name: Test Base Modules Requires PHP
|
name: Test Base Modules Requires PHP
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -198,7 +220,6 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Test action with all components
|
- name: Test action with all components
|
||||||
id: install
|
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
install-node: 'true'
|
install-node: 'true'
|
||||||
@@ -223,12 +244,17 @@ jobs:
|
|||||||
nginx -v
|
nginx -v
|
||||||
chmod +x ./scripts/health-check.sh
|
chmod +x ./scripts/health-check.sh
|
||||||
./scripts/health-check.sh ./test-server true true true
|
./scripts/health-check.sh ./test-server true true true
|
||||||
test "${{ steps.install.outputs.install-status }}" = "success"
|
|
||||||
test "${{ steps.install.outputs.node-installed }}" = "true"
|
|
||||||
test "${{ steps.install.outputs.php-installed }}" = "true"
|
|
||||||
test "${{ steps.install.outputs.nginx-installed }}" = "true"
|
|
||||||
echo "✓ All components installation successful"
|
echo "✓ All components installation successful"
|
||||||
|
|
||||||
|
- name: Run integration tests
|
||||||
|
run: |
|
||||||
|
cd ./test-server
|
||||||
|
if [ -f package.json ] && grep -q '"test:integration"' package.json; then
|
||||||
|
npm run test:integration
|
||||||
|
else
|
||||||
|
echo "⚠ No integration test script configured, skipping"
|
||||||
|
fi
|
||||||
|
|
||||||
test-custom-paths:
|
test-custom-paths:
|
||||||
name: Test Custom Server Path
|
name: Test Custom Server Path
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -238,7 +264,6 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Test action with custom path
|
- name: Test action with custom path
|
||||||
id: install
|
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
install-node: 'true'
|
install-node: 'true'
|
||||||
@@ -252,10 +277,17 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
test -d ./my-custom-server || exit 1
|
test -d ./my-custom-server || exit 1
|
||||||
test -d ./my-custom-server/node_modules || exit 1
|
test -d ./my-custom-server/node_modules || exit 1
|
||||||
test "${{ steps.install.outputs.install-path }}" = "./my-custom-server"
|
|
||||||
test "${{ steps.install.outputs.install-status }}" = "success"
|
|
||||||
echo "✓ Custom path installation successful"
|
echo "✓ Custom path installation successful"
|
||||||
|
|
||||||
|
- name: Run server tests
|
||||||
|
run: |
|
||||||
|
cd ./my-custom-server
|
||||||
|
if [ -f package.json ] && grep -q '"test"' package.json; then
|
||||||
|
npm test
|
||||||
|
else
|
||||||
|
echo "⚠ No test script configured, skipping"
|
||||||
|
fi
|
||||||
|
|
||||||
test-build-command:
|
test-build-command:
|
||||||
name: Test Build Command
|
name: Test Build Command
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
+2
-2
@@ -140,7 +140,7 @@ runs:
|
|||||||
|
|
||||||
- name: Checkout server repository (public/no token)
|
- name: Checkout server repository (public/no token)
|
||||||
if: inputs.checkout-token == ''
|
if: inputs.checkout-token == ''
|
||||||
uses: actions/checkout@v6.0.2
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: ${{ inputs.server-repository }}
|
repository: ${{ inputs.server-repository }}
|
||||||
ref: ${{ inputs.server-ref }}
|
ref: ${{ inputs.server-ref }}
|
||||||
@@ -152,7 +152,7 @@ runs:
|
|||||||
|
|
||||||
- name: Checkout server repository (with token)
|
- name: Checkout server repository (with token)
|
||||||
if: inputs.checkout-token != ''
|
if: inputs.checkout-token != ''
|
||||||
uses: actions/checkout@v6.0.2
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: ${{ inputs.server-repository }}
|
repository: ${{ inputs.server-repository }}
|
||||||
ref: ${{ inputs.server-ref }}
|
ref: ${{ inputs.server-ref }}
|
||||||
|
|||||||
Reference in New Issue
Block a user