fix: tests
Test Action / Test Node (pull_request) Has been cancelled
Test Action / Test PHP (pull_request) Has been cancelled
Test Action / Test Database Configuration (pull_request) Has been cancelled
Test Action / Test Base Modules Installation (pull_request) Has been cancelled
Test Action / Test Base Modules Requires PHP (pull_request) Has been cancelled
Test Action / Test nginx (pull_request) Has been cancelled
Test Action / Test All Components (pull_request) Has been cancelled
Test Action / Test Custom Server Path (pull_request) Has been cancelled
Test Action / Test Build Command (pull_request) Has been cancelled

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-07-23 00:02:45 -04:00
parent d9dd782229
commit fe79deb183
2 changed files with 58 additions and 0 deletions
+43
View File
@@ -5,6 +5,13 @@ on:
pull_request:
branches: [ main ]
# Keep the fixture source in one place. Override these with repository variables
# when testing another server repository; no workflow edits are required.
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' }}
jobs:
test-node:
name: Test Node
@@ -18,6 +25,10 @@ jobs:
install-node: 'true'
node-version: '24'
server-path: './test-server'
server-repository: ${{ env.TEST_SERVER_REPOSITORY }}
server-ref: ${{ env.TEST_SERVER_REF }}
github-server-url: ${{ env.TEST_GIT_SERVER_URL }}
checkout-token: ${{ secrets.TEST_SERVER_TOKEN }}
- name: Verify installation
run: |
@@ -44,6 +55,10 @@ jobs:
install-php: 'true'
php-version: '8.5'
server-path: './test-server'
server-repository: ${{ env.TEST_SERVER_REPOSITORY }}
server-ref: ${{ env.TEST_SERVER_REF }}
github-server-url: ${{ env.TEST_GIT_SERVER_URL }}
checkout-token: ${{ secrets.TEST_SERVER_TOKEN }}
- name: Verify installation
run: |
@@ -79,6 +94,10 @@ jobs:
database-uri: 'mongodb://127.0.0.1:27017/?tls=false'
database-name: 'ktrix_ci'
app-environment: 'test'
server-repository: ${{ env.TEST_SERVER_REPOSITORY }}
server-ref: ${{ env.TEST_SERVER_REF }}
github-server-url: ${{ env.TEST_GIT_SERVER_URL }}
checkout-token: ${{ secrets.TEST_SERVER_TOKEN }}
- name: Verify configuration was written
run: |
@@ -119,6 +138,10 @@ jobs:
database-uri: 'mongodb://127.0.0.1:27017/?tls=false'
database-name: 'ktrix_ci'
install-base-modules: 'true'
server-repository: ${{ env.TEST_SERVER_REPOSITORY }}
server-ref: ${{ env.TEST_SERVER_REF }}
github-server-url: ${{ env.TEST_GIT_SERVER_URL }}
checkout-token: ${{ secrets.TEST_SERVER_TOKEN }}
- name: Verify password authentication provider is installed and enabled
run: |
@@ -152,6 +175,10 @@ jobs:
install-node: 'true'
install-base-modules: 'true'
server-path: './test-server'
server-repository: ${{ env.TEST_SERVER_REPOSITORY }}
server-ref: ${{ env.TEST_SERVER_REF }}
github-server-url: ${{ env.TEST_GIT_SERVER_URL }}
checkout-token: ${{ secrets.TEST_SERVER_TOKEN }}
- name: Verify the action failed
run: |
@@ -172,6 +199,10 @@ jobs:
with:
install-nginx: 'true'
server-path: './test-server'
server-repository: ${{ env.TEST_SERVER_REPOSITORY }}
server-ref: ${{ env.TEST_SERVER_REF }}
github-server-url: ${{ env.TEST_GIT_SERVER_URL }}
checkout-token: ${{ secrets.TEST_SERVER_TOKEN }}
- name: Verify installation
run: |
@@ -198,6 +229,10 @@ jobs:
node-version: '24'
php-version: '8.5'
server-path: './test-server'
server-repository: ${{ env.TEST_SERVER_REPOSITORY }}
server-ref: ${{ env.TEST_SERVER_REF }}
github-server-url: ${{ env.TEST_GIT_SERVER_URL }}
checkout-token: ${{ secrets.TEST_SERVER_TOKEN }}
- name: Verify installation
run: |
@@ -232,6 +267,10 @@ jobs:
with:
install-node: 'true'
server-path: './my-custom-server'
server-repository: ${{ env.TEST_SERVER_REPOSITORY }}
server-ref: ${{ env.TEST_SERVER_REF }}
github-server-url: ${{ env.TEST_GIT_SERVER_URL }}
checkout-token: ${{ secrets.TEST_SERVER_TOKEN }}
- name: Verify installation
run: |
@@ -260,6 +299,10 @@ jobs:
install-node: 'true'
server-path: './test-server'
build-command: 'echo "Build complete" > build.log'
server-repository: ${{ env.TEST_SERVER_REPOSITORY }}
server-ref: ${{ env.TEST_SERVER_REF }}
github-server-url: ${{ env.TEST_GIT_SERVER_URL }}
checkout-token: ${{ secrets.TEST_SERVER_TOKEN }}
- name: Verify build
run: |
+15
View File
@@ -231,6 +231,21 @@ Delegates cloning to [action-module-install](https://git.ktrix.dev/Nodarx/action
| `base-modules-repository` | Repository URL for the password authentication provider module | No | `https://git.ktrix.dev/Nodarx/authentication_provider_password` |
| `base-modules-branch` | Branch, tag, or commit to check out for the password authentication provider module | No | `main` |
## Testing Against Another Source
The action's test workflow keeps its server fixture source in repository
variables. The defaults target `Nodarx/server` on `https://git.ktrix.dev`.
To test another source without editing the workflow, set:
| Repository variable | Purpose | Default |
|---------------------|---------|---------|
| `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` |
For a private source, also add a repository secret named
`TEST_SERVER_TOKEN`. Public repositories do not require the secret.
## Outputs
| Output | Description |