This commit is contained in:
parent
22b53ab204
commit
cad519009d
|
@ -9,6 +9,9 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: /var/www/html/openstamanager
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -18,6 +21,9 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Creating working directory
|
||||||
|
run: sudo mkdir /var/www/html/openstamanager
|
||||||
|
|
||||||
- name: Startup Apache2
|
- name: Startup Apache2
|
||||||
run: sudo service apache2 start
|
run: sudo service apache2 start
|
||||||
|
|
||||||
|
@ -109,22 +115,21 @@ jobs:
|
||||||
with:
|
with:
|
||||||
repository: devcode-it/openstamanager-tests
|
repository: devcode-it/openstamanager-tests
|
||||||
path: python-tests
|
path: python-tests
|
||||||
working-directory: /var/www/html/openstamanager
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
- name: Install Python dependencies
|
||||||
run: |
|
run: |
|
||||||
cd /var/www/html/python-tests/
|
cd python-tests/
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
python -m pip install pytest
|
python -m pip install pytest
|
||||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||||
|
|
||||||
- name: Init test configuration
|
- name: Init test configuration
|
||||||
run: |
|
run: |
|
||||||
cd /var/www/html/python-tests/
|
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/openstamanager\",\n \"browser\": \"firefox\",\n \"headless\": true\n}" > config.json
|
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/openstamanager\",\n \"browser\": \"firefox\",\n \"headless\": true\n}" > config.json
|
||||||
pytest Init.py
|
pytest Init.py
|
||||||
|
|
||||||
- name: Execute tests
|
- name: Execute tests
|
||||||
run: |
|
run: |
|
||||||
cd /var/www/html/python-tests/
|
cd python-tests/
|
||||||
pytest tests
|
pytest tests
|
||||||
|
|
Loading…
Reference in New Issue