Run selenium tests w/ pytest, github workflow

This commit is contained in:
mvdbeek
2020-11-22 18:44:33 +01:00
parent 0382e64e61
commit 4f5f3dcfb2
2 changed files with 45 additions and 3 deletions
+42
View File
@@ -0,0 +1,42 @@
name: Selenium tests
on: [push, pull_request]
env:
GALAXY_TEST_DBURI: 'postgres://postgres:postgres@localhost:5432/galaxy?client_encoding=utf8'
SKIP_FLAKEY_TESTS_ON_ERROR: 'true'
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7']
services:
postgres:
image: postgres:11
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
with:
path: 'galaxy root'
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip dir
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }}
- uses: nanasess/setup-chromedriver@master
- name: Run tests
run: ./run_tests.sh -selenium
working-directory: 'galaxy root'
- uses: actions/upload-artifact@v2
if: failure()
with:
name: Selenium test results
path: 'galaxy root/database/test_errors'
+3 -3
View File
@@ -393,7 +393,7 @@ do
;;
-selenium|--selenium)
GALAXY_TEST_TOOL_CONF="lib/galaxy/config/sample/tool_conf.xml.sample,test/functional/tools/samples_tool_conf.xml"
test_script="./scripts/functional_tests.py"
test_script="pytest"
report_file="./run_selenium_tests.html"
skip_client_build=""
selenium_test=1;
@@ -617,8 +617,8 @@ setup_python
if [ -n "$framework_test" -o -n "$installed_test" -o -n "$migrated_test" -o -n "$data_managers_test" ] ; then
[ -n "$test_id" ] && selector="-k $test_id" || selector=""
extra_args="test/functional/test_toolbox_pytest.py $selector $marker"
elif [ -n "$selenium_test" ] ; then
extra_args="$selenium_script -selenium"
elif [ -n "$selenium_script" ]; then
extra_args="$selenium_script"
elif [ -n "$toolshed_script" ]; then
extra_args="$toolshed_script"
elif [ -n "$api_script" ]; then