diff --git a/.github/workflows/selenium.yaml b/.github/workflows/selenium.yaml new file mode 100644 index 00000000000..22f164063d5 --- /dev/null +++ b/.github/workflows/selenium.yaml @@ -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' diff --git a/run_tests.sh b/run_tests.sh index bfba8017727..199b89c38a1 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -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