Compare commits

...

29 Commits

Author SHA1 Message Date
loviuz 9411e66c41
CI 2021-05-15 16:44:14 +02:00
loviuz 0b43e63d02
CI 2021-05-15 16:42:08 +02:00
loviuz 8b83aeedc4
CI 2021-05-15 16:41:32 +02:00
loviuz 182843fe79
CI 2021-05-15 16:25:56 +02:00
loviuz cad519009d
CI 2021-05-15 16:21:47 +02:00
loviuz 22b53ab204
CI 2021-05-15 16:15:00 +02:00
loviuz 9351789653
CI 2021-05-15 16:03:14 +02:00
loviuz 80e78cebd1
CI 2021-05-15 15:57:22 +02:00
loviuz 26324c140a
CI 2021-05-15 15:55:09 +02:00
loviuz 0de30dd70f
CI 2021-05-15 15:53:57 +02:00
loviuz 9b0e1b6a88
CI 2021-05-15 15:51:36 +02:00
loviuz e7d916c28a
CI 2021-05-15 15:42:36 +02:00
loviuz 8d1d031c9e
CI 2021-05-15 15:37:16 +02:00
loviuz 575c538369
CI 2021-05-15 15:25:33 +02:00
loviuz b3ad9287e7
CI 2021-05-15 15:09:32 +02:00
loviuz d26a16c678 Miglioramento logo durante installazione 2021-05-15 14:59:52 +02:00
loviuz 9088f39d8e
CI 2021-05-15 14:57:01 +02:00
loviuz b245f2a98f
CI 2021-05-15 13:17:13 +02:00
loviuz 88b305b436
CI 2021-05-15 13:06:54 +02:00
loviuz e5cbc02479
CI 2021-05-15 12:53:20 +02:00
loviuz 22ae77f464
CI 2021-05-15 12:46:17 +02:00
loviuz 04548ab1e7
CI 2021-05-15 12:38:27 +02:00
loviuz 4bb2a0b2ba
CI 2021-05-15 12:36:30 +02:00
loviuz ac1a3ac499
CI 2021-05-15 12:33:11 +02:00
loviuz 8ad5bc12ea
CI 2021-05-15 12:30:29 +02:00
loviuz b4c091c0f8
CI 2021-05-15 12:07:48 +02:00
loviuz 16e5b19ca6
OpenSTAManager CI 2021-05-15 11:54:10 +02:00
loviuz f728a23235
Correzione CI 2021-05-15 11:49:37 +02:00
loviuz 8127e6681e
Creazione primo test 2021-05-15 11:27:50 +02:00
2 changed files with 144 additions and 2 deletions

143
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,143 @@
name: OpenSTAManager CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
tests:
runs-on: ubuntu-latest
container:
image: php:7.4-apache
ports:
- 80:80
options: --network-alias=testserver
env:
TEST_BASE_URL: http://testserver
SELENIUM_HOST: http://selenium:4444/wd/hub
services:
selenium:
image: selenium/standalone-chrome
ports:
- 4444:4444
strategy:
matrix:
python-version: [3.9]
php-version: ['8.0']
steps:
- uses: actions/checkout@v2
- name: Shutdown Ubuntu MySQL (SUDO)
run: sudo service mysql stop # Shutdown the Default MySQL, "sudo" is necessary, please not remove it
- name: Set up MySQL
uses: mirromutth/mysql-action@v1.1
with:
mysql database: 'osm'
mysql root password: 'root'
mysql user: 'root'
mysql password: 'root'
- name: Set up PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install SeleniumBase
uses: actions/checkout@v2
with:
repository: seleniumbase/SeleniumBase
path: selenium-base
- name: Configure SeleniumBase
run: |
cd selenium-base
python setup.py install
- name: Install Chrome and Firefox
run: |
sudo apt install google-chrome-stable
sudo apt-get install firefox
- name: Check the console scripts interface
run: |
seleniumbase
sbase
- name: Install chromedriver and geckodriver (Firefox Webdriver)
run: |
seleniumbase install chromedriver
seleniumbase install geckodriver
- name: Make sure pytest is working
run: |
echo "def test_1(): pass" > nothing.py
pytest nothing.py
- name: Make sure nosetests is working
run: |
echo "def test_2(): pass" > nothing2.py
nosetests nothing2.py
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install Composer dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Use NPM and Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install NPM and compile assets
run: |
yarn install
npm run build-OSM
- name: Check out test repository
uses: actions/checkout@v2
with:
repository: devcode-it/openstamanager-tests
path: python-tests
- name: Copy OSM to www root
run: |
sudo cp -R * /var/www/html/
sudo rm /var/www/html/index.html
sudo chmod -R 0777 /var/www/html/
- name: Install Python dependencies
run: |
cd python-tests/
python -m pip install --upgrade pip
python -m pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Init test configuration
run: |
cd python-tests/
echo -ne "{\n \"login\": {\n \"password\": \"admin\",\n \"username\": \"admin\"\n },\n \"database\": {\n \"host\": \"localhost\",\n \"user\": \"root\",\n \"pass\": \"root\",\n \"name\": \"osm\"\n },\n \"server\": \"http://localhost/\",\n \"browser\": \"firefox\",\n \"headless\": true\n}" > config.json
pytest Init.py
- name: Execute tests
run: |
cd python-tests/
pytest tests

View File

@ -329,8 +329,7 @@ if (empty($creation) && (!file_exists('config.inc.php') || !$valid_config)) {
echo '
<div class="box box-center-large box-warning">
<div class="box-header with-border text-center">
<img src="'.$img.'/logo.png" class="logo-image" alt="'.tr('OSM Logo').'">
<h3 class="box-title">'.tr('OpenSTAManager').'</h3>
<img src="'.$img.'/logo.png" width="300" alt="'.tr('OSM Logo').'">
</div>
<div class="box-body" id="smartwizard">