Skip to content

Commit

Permalink
httpd config, reenable other services
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippImhof committed Jan 13, 2025
1 parent 4538a5e commit cc59727
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/testing-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,12 @@ jobs:
phpts: ts

- name: Setup PostgreSQL
if: false
run: |
$pgService = Get-Service -Name postgresql*
Set-Service -InputObject $pgService -Status running -StartupType automatic
Start-Process -FilePath "$env:PGBIN\pg_isready" -Wait -PassThru
- name: Initialise moodle-plugin-ci
if: false
shell: bash
run: |
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^4
Expand All @@ -66,7 +64,6 @@ jobs:
echo $(echo $PGBIN | sed s/C:/\\/c/ | tr \\\\ /) >> $GITHUB_PATH
- name: Install moodle-plugin-ci
if: false
shell: bash
run: |
moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1 --db-user=$PGUSER --db-pass=$PGPASSWORD
Expand All @@ -80,22 +77,28 @@ jobs:
run: moodle-plugin-ci phpunit --fail-on-warning

- name: Setup Java
if: false
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'

- name: Setup Apache PHP module
- name: Setup Apache
run: |
$phpPath = "C:/tools/php"
$apacheConfig = "C:/tools/Apache24/conf/httpd.conf"
$confFile = "C:/tools/Apache24/conf/httpd.conf"
# Add PHP module
Add-Content $apacheConfig `
"`n# PHP Configuration`n" + `
"LoadModule php_module $phpPath/php8apache2_4.dll`n" + `
"AddType application/x-httpd-php .php`n" + `
"PHPIniDir $phpPath"
Add-Content $confFile @"
LoadModule php_module $phpPath/php8apache2_4.dll
AddType application/x-httpd-php .php
PHPIniDir $phpPath
# Overwrite DocumentRoot
DocumentRoot D:/a/moodle-quiz_essaydownload/moodle-quiz_essaydownload
"@
# Change Server Config
$config = Get-Content $confFile -Raw
$config = $config -replace 'Listen 80', 'Listen 8080'
$config = $config -replace 'ServerName localhost:80', 'ServerName localhost:8080'
Set-Content $confFile $config
- name: Start Apache Server
run: |
Expand Down

0 comments on commit cc59727

Please sign in to comment.