Skip to content

Commit

Permalink
Revert "Release 5.6.44+231107"
Browse files Browse the repository at this point in the history
This reverts commit e372135.
  • Loading branch information
olleharstedt committed Nov 6, 2023
1 parent e372135 commit e48a9eb
Show file tree
Hide file tree
Showing 2,246 changed files with 163,534 additions and 87,990 deletions.
3 changes: 0 additions & 3 deletions .gitattributes
@@ -1,5 +1,3 @@


# exclude build/devel/test files from export to zip/tarball
.bowerrc export-ignore
buildVueComponents.js export-ignore
Expand Down Expand Up @@ -39,4 +37,3 @@ vendor/khaled.alshamaa/ar-php/examples export-ignore
*.gif binary
*.ico binary
*.mo binary
node_modules/* binary
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
@@ -0,0 +1,21 @@
name: Build
on:
push:
branches:
- master
- sonarcubefixes
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
8 changes: 0 additions & 8 deletions .github/workflows/frontend.yml
Expand Up @@ -26,14 +26,6 @@ jobs:
- name: Checkout the code
uses: actions/checkout@v2

- name: Run composer
run: |
composer install -vvv
- name: Run yarn
run: |
yarn install
- name: Prepare nvm with Node ${{ matrix.nodeJS-versions }}
run: |
# Update
Expand Down
161 changes: 13 additions & 148 deletions .github/workflows/main.yml
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
# Specify what versions of php you want to test
php-versions: ['7.4', '8.2']
php-versions: ['7.2', '8.0']
# Env vars for this job
env:
DBENGINE: INNODB
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
run: |
# Set up the Apache and PHP
sudo apt-get update > /dev/null
sudo apt --fix-broken install php php-mysql php8.0-mysql php7.4-mysql libapache2-mod-php8.0 -y
sudo apt install php php-mysql php8.0-mysql php7.2-mysql libapache2-mod-php8.0 -y
sudo cp -f ./tests/CI-pipeline/github-actions-apache /etc/apache2/sites-available/000-default.conf
sudo sed -e "s?%CI_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
Expand Down Expand Up @@ -111,6 +111,7 @@ jobs:
#sudo tail -n 500 /var/log/apache2/error.log || true
#sudo tail -n 500 /var/log/nginx/error.log || true
#sudo tail -n 500 /var/log/php7.4-fpm.log || true
#sudo tail -n 500 /var/log/php7.2-fpm.log || true
#sudo tail -n 500 /var/log/php8.0-fpm.log || true
# NOTE: php --version might not be the same as setup in apache. Use fwrite(STDERR, phpversion()); in index.php to be sure.
#which php
Expand All @@ -124,19 +125,26 @@ jobs:
# wget https://chromedriver.storage.googleapis.com/2.33/chromedriver_linux64.zip
# unzip chromedriver_linux64.zip

- name: Run unit tests
env:
XDEBUG_MODE: coverage
run: php vendor/bin/phpunit --testdox --stop-on-failure tests/unit

- name: Check test coverage if cov.xml exists (won't work on PHP 8 with current phpunit version)
run: php tests/bin/check_coverage.php cov.xml 37

- name: Set up Selenium with firefox (needed for integrity tests)
run: |
echo `which firefox`
echo `firefox -v`
echo `geckodriver --version`
# Setup Selenium with Firefox headless mode, Gecko driver already installed
wget "https://selenium-release.storage.googleapis.com/3.9/selenium-server-standalone-3.9.1.jar"
wget "https://selenium-release.storage.googleapis.com/3.7/selenium-server-standalone-3.7.1.jar"
export MOZ_HEADLESS=1
export MOZ_HEADLESS_WIDTH=1280
export MOZ_HEADLESS_HEIGHT=1024
java -jar selenium-server-standalone-3.9.1.jar &
sleep 1
java -jar selenium-server-standalone-3.7.1.jar -enablePassThrough false > /dev/null 2> /dev/null &
- name: Run functional tests
env:
Expand All @@ -150,150 +158,7 @@ jobs:
name: screenshots
path: tests/tmp/screenshots/
retention-days: 5

unit-tests:
runs-on: ubuntu-20.04
strategy:
matrix:
# Specify what versions of php you want to test
php-versions: ['7.4', '8.2']
env:
DBENGINE: INNODB
steps:
- uses: actions/checkout@v2

- name: Install specified PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}

- name: Setup
run: |
touch enabletests
composer install -vvv
sudo apt-get update > /dev/null
sudo apt --fix-broken install php php-mysql php8.0-mysql php7.4-mysql -y
chmod -R 777 ./tmp
chmod -R 777 ./upload
chmod -R 777 ./themes
chmod -R 777 ./tests/tmp
chmod -R 777 ./application/config
- name: Check MySQL service
run: |
# InnoDB needs large_file_prefix & Barracuda file format
# https://discuss.gogs.io/t/solved-mysql-error-1064-while-running-first-install/1604
# InnoDB variables ARE already set to desired values in Github runner (ubuntu-18.04)
sudo systemctl start mysql
sudo service mysql status
mysql -uroot -proot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';" || true
mysql -uroot -proot -e "Show variables like '%large%';"
mysql -uroot -proot -e "Show variables like '%innodb_file%';"
mysql -uroot -proot -e "Show variables like '%innodb_default%';"
mysql -uroot -proot -e "CREATE DATABASE limesurvey;"
- name: Load custom console and start the Application
run: |
cp application/config/config-sample-mysql.php application/config/config.php
php application/commands/console.php install admin password TravisLS no@email.com verbose
- name: Run unit tests
env:
XDEBUG_MODE: coverage
run: php vendor/bin/phpunit --testdox --stop-on-failure tests/unit

- name: Upload cov.xml
uses: actions/upload-artifact@v3
with:
name: cov-file-${{ matrix.php-versions }}
path: cov.xml

test-coverage:
runs-on: ubuntu-20.04
needs: unit-tests
strategy:
matrix:
# Specify what versions of php you want to test
php-versions: ['7.4', '8.2']
steps:
- uses: actions/checkout@v2

- name: Install specified PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}

- name: Check if cov.xml artefact exists
uses: xSAVIKx/artifact-exists-action@v0
id: check_coverage_artifact
with:
name: cov-file-${{ matrix.php-versions }}

- name: Download cov.xml
if: steps.check_coverage_artifact.outputs.exists == 'true'
uses: actions/download-artifact@v3
with:
name: cov-file-${{ matrix.php-versions }}

- name: Check test coverage if cov.xml exists (won't work on PHP 8 with current phpunit version)
run: php tests/bin/check_coverage.php cov.xml 37

code-check:
runs-on: ubuntu-20.04
env:
DBENGINE: INNODB
strategy:
matrix:
# Specify what versions of php you want to test
php-versions: ['7.4', '8.2']
steps:
- uses: actions/checkout@v2

- name: Install specified PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}

- name: Setup
run: |
touch enabletests
composer install -vvv
sudo apt-get update > /dev/null
sudo apt --fix-broken install php php-mysql php8.0-mysql php7.4-mysql -y
chmod -R 777 ./tmp
chmod -R 777 ./upload
chmod -R 777 ./themes
chmod -R 777 ./tests/tmp
chmod -R 777 ./application/config
chmod +x ./tests/bin/lint-*
- name: Check MySQL service
run: |
# InnoDB needs large_file_prefix & Barracuda file format
# https://discuss.gogs.io/t/solved-mysql-error-1064-while-running-first-install/1604
# InnoDB variables ARE already set to desired values in Github runner (ubuntu-18.04)
sudo systemctl start mysql
sudo service mysql status
mysql -uroot -proot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';" || true
mysql -uroot -proot -e "Show variables like '%large%';"
mysql -uroot -proot -e "Show variables like '%innodb_file%';"
mysql -uroot -proot -e "Show variables like '%innodb_default%';"
mysql -uroot -proot -e "CREATE DATABASE limesurvey;"
- name: Load custom console and start the Application
run: |
cp application/config/config-sample-mysql.php application/config/config.php
php application/commands/console.php install admin password TravisLS no@email.com verbose

- name: Run syntax check, CodeSniffer, MessDetector, ...
run: composer test

- name: Run Psalm on application/ folder with low strictness
run: |
./vendor/bin/psalm -c psalm-all.xml
60 changes: 6 additions & 54 deletions .gitignore
Expand Up @@ -4,6 +4,7 @@
/application/config/security.php

# Don't include LS4 security.php
/application/config/security.php

## Ignore any hidden folder/files (except explicitly defined)
## such as various IDE folders .idea .netbeans .vscode
Expand Down Expand Up @@ -44,6 +45,7 @@
/upload/themes/survey/generalfiles/*.*
!/upload/themes/survey/generalfiles/index.html
!/upload/themes/survey/index.html
!/upload/themes/survey/generalfiles/index.html
/upload/themes/question/*.*
/upload/themes/question/**/*.*
!/upload/themes/question/readme.txt
Expand Down Expand Up @@ -74,56 +76,7 @@
/styles/

#ignore most of the js-build stuff
node_modules/*
node_modules/**/docs
node_modules/**/demo
node_modules/**/meteor
node_modules/**/src
!/node_modules/devbridge-autocomplete/
!/node_modules/ace-builds/
!/node_modules/datatables.net/
!/node_modules/datatables.net-bs5/
!/node_modules/decimal.js/
!/node_modules/dom-to-image/
!/node_modules/jspdf/
!/node_modules/jszip/
!/node_modules/nestedSortable/
!/node_modules/jquery/dist/
!/node_modules/jquery-ui-dist/
!/node_modules/jquery.actual/
!/node_modules/jsuri/
!/node_modules/jquery-ui-touch-punch/


!/node_modules/select2
/node_modules/select2/*
!/node_modules/select2/dist/

!/node_modules/select2-bootstrap-5-theme
/node_modules/select2-bootstrap-5-theme/*
!/node_modules/select2-bootstrap-5-theme/dist/

!/node_modules/jquery-migrate
/node_modules/jquery-migrate/*
!/node_modules/jquery-migrate/dist/

!/node_modules/tablesorter
/node_modules/tablesorter/*
!/node_modules/tablesorter/dist/

!/node_modules/js-cookie
/node_modules/js-cookie/*
!/node_modules/js-cookie/dist/

!/node_modules/moment
/node_modules/moment/*
!/node_modules/moment/min/

!/node_modules/leaflet
/node_modules/leaflet/*
!/node_modules/leaflet/dist/


node_modules/
vendor/**/docs/
vendor/**/scripts/
vendor/**/tests/
Expand All @@ -136,7 +89,6 @@ yarn-error.log

# Test stuff
chromedriver
cov.xml

# RFC and commons directory and files
/.well-known/
Expand Down Expand Up @@ -188,6 +140,7 @@ vendor/phpdocumentor/
vendor/phpmd/
vendor/phpspec/
vendor/phpunit/
vendor/psr/
vendor/sebastian/
vendor/theseer/
vendor/vimeo/
Expand All @@ -196,6 +149,7 @@ vendor/misantron/
upload/templates/
assets/packages/ckeditor/samples


## ignore Vagrantfile and Adminer
adminer.php
Vagrantfile
Expand All @@ -212,10 +166,10 @@ themes/survey/no_bootstrap/files/*
!themes/survey/*/files/logo_w_s.png
!themes/survey/*/files/pattern.png
!themes/survey/*/files/print_img_radio.png
adminer.php

# Used by tests.
geckodriver
geckodriver.exe
selenium-server-standalone-3.7.1.jar

# Used by Vim and Emacs
Expand All @@ -230,5 +184,3 @@ package-lock.json
docker-compose.yml
docker/
/geckodriver-v0.23.0-linux64.tar.gz
/yarn.lock
/geckodriver.exe

0 comments on commit e48a9eb

Please sign in to comment.