fis: databsee test
Test Action / Test Node (push) Has been cancelled
Test Action / Test Database Configuration (push) Has been cancelled
Test Action / Test Base Modules Installation (push) Has been cancelled
Test Action / Test nginx (push) Has been cancelled
Test Action / Test All Components (push) Has been cancelled
Test Action / Test Custom Server Path (push) Has been cancelled
Test Action / Test Build Command (push) Has been cancelled
Test Action / Test PHP (push) Failing after 11m10s
Test Action / Test Base Modules Requires PHP (push) Failing after 11m20s
Test Action / Test Node (push) Has been cancelled
Test Action / Test Database Configuration (push) Has been cancelled
Test Action / Test Base Modules Installation (push) Has been cancelled
Test Action / Test nginx (push) Has been cancelled
Test Action / Test All Components (push) Has been cancelled
Test Action / Test Custom Server Path (push) Has been cancelled
Test Action / Test Build Command (push) Has been cancelled
Test Action / Test PHP (push) Failing after 11m10s
Test Action / Test Base Modules Requires PHP (push) Failing after 11m20s
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -11,6 +11,7 @@ env:
|
||||
TEST_SERVER_REPOSITORY: ${{ vars.TEST_SERVER_REPOSITORY || 'Nodarx/server' }}
|
||||
TEST_SERVER_REF: ${{ vars.TEST_SERVER_REF || 'main' }}
|
||||
TEST_GIT_SERVER_URL: ${{ vars.TEST_GIT_SERVER_URL || 'https://git.ktrix.dev' }}
|
||||
TEST_DATABASE_URI: ${{ vars.TEST_DATABASE_URI || 'mongodb://mongo:27017/?tls=false' }}
|
||||
|
||||
jobs:
|
||||
test-node:
|
||||
@@ -91,7 +92,7 @@ jobs:
|
||||
install-php: 'true'
|
||||
php-version: '8.5'
|
||||
server-path: './test-server'
|
||||
database-uri: 'mongodb://127.0.0.1:27017/?tls=false'
|
||||
database-uri: ${{ env.TEST_DATABASE_URI }}
|
||||
database-name: 'ktrix_ci'
|
||||
app-environment: 'test'
|
||||
server-repository: ${{ env.TEST_SERVER_REPOSITORY }}
|
||||
@@ -107,7 +108,8 @@ jobs:
|
||||
$uri = $config["database"]["uri"] ?? null;
|
||||
$name = $config["database"]["database"] ?? null;
|
||||
$env = $config["environment"] ?? null;
|
||||
if ($uri !== "mongodb://127.0.0.1:27017/?tls=false") { fwrite(STDERR, "database.uri not overridden, got: $uri\n"); exit(1); }
|
||||
$expectedUri = getenv("TEST_DATABASE_URI");
|
||||
if ($uri !== $expectedUri) { fwrite(STDERR, "database.uri not overridden, got: $uri\n"); exit(1); }
|
||||
if ($name !== "ktrix_ci") { fwrite(STDERR, "database.database not overridden, got: $name\n"); exit(1); }
|
||||
if ($env !== "test") { fwrite(STDERR, "environment not overridden, got: $env\n"); exit(1); }
|
||||
'
|
||||
@@ -135,7 +137,7 @@ jobs:
|
||||
install-php: 'true'
|
||||
php-version: '8.5'
|
||||
server-path: './test-server'
|
||||
database-uri: 'mongodb://127.0.0.1:27017/?tls=false'
|
||||
database-uri: ${{ env.TEST_DATABASE_URI }}
|
||||
database-name: 'ktrix_ci'
|
||||
install-base-modules: 'true'
|
||||
server-repository: ${{ env.TEST_SERVER_REPOSITORY }}
|
||||
|
||||
@@ -246,10 +246,18 @@ To test another source without editing the workflow, set:
|
||||
| `TEST_SERVER_REPOSITORY` | Repository in `owner/name` form | `Nodarx/server` |
|
||||
| `TEST_SERVER_REF` | Branch, tag, or commit | `main` |
|
||||
| `TEST_GIT_SERVER_URL` | Base URL of the GitHub-compatible server | `https://git.ktrix.dev` |
|
||||
| `TEST_DATABASE_URI` | MongoDB service URI used by database tests | `mongodb://mongo:27017/?tls=false` |
|
||||
|
||||
For a private source, also add a repository secret named
|
||||
`TEST_SERVER_TOKEN`. Public repositories do not require the secret.
|
||||
|
||||
Gitea Actions runs the job and service containers separately. Workflows that
|
||||
declare a MongoDB service named `mongo` must therefore pass
|
||||
`database-uri: mongodb://mongo:27017/?tls=false`; `127.0.0.1` points to the job
|
||||
container, not the MongoDB service. On runner setups where services are
|
||||
published directly onto the host, override `TEST_DATABASE_URI` with the
|
||||
appropriate host address.
|
||||
|
||||
## Outputs
|
||||
|
||||
| Output | Description |
|
||||
|
||||
Reference in New Issue
Block a user