Skip to content

Step 2 - Dynamic tests 🧪 #227

Step 2 - Dynamic tests 🧪

Step 2 - Dynamic tests 🧪 #227

Workflow file for this run

name: Step 2 - Dynamic tests 🧪
on:
workflow_dispatch:
inputs:
server:
description: "Server"
required: true
default: "qa.orcid.org"
orcid:
description: "ORCID"
required: true
default: ""
username:
description: "Username"
required: true
default: "ma_test_[DD][month][YYYY]"
password:
description: "Password"
required: true
default: "test1234"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: ${{github.event.inputs.orcid}} - ${{github.event.inputs.username}} - ${{github.event.inputs.server}}
run: |
echo "ORCID iD - ${{github.event.inputs.orcid}}"
echo "username - ${{github.event.inputs.username}}"
echo "server - ${{github.event.inputs.server}}"
echo "branch - ${GITHUB_REF#refs/heads/}"
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -q -r orcid/requirements.txt
touch orcid/local_properties.py
echo "type='actions'" >> 'orcid/properties.py'
echo "orcidId='${{github.event.inputs.orcid}}'" >> 'orcid/properties.py'
echo "user_login='${{github.event.inputs.username}}@mailinator.com'" >> 'orcid/properties.py'
echo "searchValue='${{github.event.inputs.username}}'" >> 'orcid/properties.py'
echo "user_pass='${{github.event.inputs.password}}'" >> 'orcid/properties.py'
echo "test_server='${{github.event.inputs.server}}'" >> 'orcid/properties.py'
echo "OBOUserClientId='${{secrets.QA_OBO_USER_CLIENT_ID}}'" >> 'orcid/properties.py'
echo "OBOUserClientSecret='${{secrets.QA_OBO_USER_CLIENT_SECRET}}'" >> 'orcid/properties.py'
echo "OBOMemberClientId='${{secrets.QA_OBO_MEMBER_CLIENT_ID}}'" >> 'orcid/properties.py'
echo "OBOMemberClientSecret='${{secrets.QA_OBO_MEMBER_CLIENT_SECRET}}'" >> 'orcid/properties.py'
echo "OBOMemberSecondId='${{secrets.QA_OBO_MEMBER_SECOND_ID}}'" >> 'orcid/properties.py'
echo "OBOMemberSecondSecret='${{secrets.QA_OBO_MEMBER_SECOND_SECRET}}'" >> 'orcid/properties.py'
echo "OpenClientId='${{secrets.QA_OPEN_CLIENT_ID}}'" >> 'orcid/properties.py'
echo "OpenClientSecret='${{secrets.QA_OPEN_CLIENT_SECRET}}'" >> 'orcid/properties.py'
echo "notifyToken='${{secrets.QA_NOTIFY_TOKEN}}'" >> 'orcid/properties.py'
echo "memberClientId='${{secrets.QA_MEMBER_CLIENT_ID}}'" >> 'orcid/properties.py'
echo "memberClientSecret='${{secrets.QA_MEMBER_CLIENT_SECRET}}'" >> 'orcid/properties.py'
echo "staticOBOUserAccess='${{secrets.QA_STATIC_OBO_USER_TOKEN}}'" >> 'orcid/properties.py'
echo "staticId='${{secrets.QA_STATIC_ORCID}}'" >> 'orcid/properties.py'
echo "staticAccess='${{secrets.QA_STATIC_TOKEN}}'" >> 'orcid/properties.py'
echo "publicClientId='${{secrets.QA_PUBLIC_CLIENT_ID}}'" >> 'orcid/properties.py'
echo "publicClientSecret='${{secrets.QA_PUBLIC_CLIENT_SECRET}}'" >> 'orcid/properties.py'
echo "premiumClientId='${{secrets.QA_PREMIUM_CLIENT_ID}}'" >> 'orcid/properties.py'
echo "premiumClientSecret='${{secrets.QA_PREMIUM_CLIENT_SECRET}}'" >> 'orcid/properties.py'
- name: Setup Selenium/geckodriver
run: |
which geckodriver
geckodriver --version
which firefox
firefox --version
- name: Test member API 2.0
run: py.test --junitxml orcid/.py_env/Scripts/results/test_member20_api_post_update.xml orcid/test_member20_api_post_update.py
- name: Test member API 2.1
run: py.test --junitxml orcid/.py_env/Scripts/results/test_member21_api_post_update.xml orcid/test_member21_api_post_update.py
- name: Test member API 3.0
run: py.test --junitxml orcid/.py_env/Scripts/results/test_member30_api_post_update.xml orcid/test_member30_api_post_update.py
- name: Test member OBO
run: py.test --junitxml orcid/.py_env/Scripts/results/test_member_obo.xml orcid/test_member_obo.py
- name: Test OpenID
run: py.test --junitxml orcid/.py_env/Scripts/results/test_oauth_open_id.xml orcid/test_oauth_open_id.py
- name: Test search
run: py.test --junitxml orcid/.py_env/Scripts/results/test_public_api_read_search.xml orcid/test_public_api_read_search.py
- name: Test expected errors
run: py.test --junitxml orcid/.py_env/Scripts/results/test_expected_errors.xml orcid/test_expected_errors.py
- name: Test refresh tokens
run: py.test --junitxml orcid/.py_env/Scripts/results/test_refresh_tokens.xml orcid/test_refresh_tokens.py