Skip to content

Step 1 - Static tests 🧪 #214

Step 1 - Static tests 🧪

Step 1 - Static tests 🧪 #214

Workflow file for this run

name: Step 1 - Static tests 🧪
on:
workflow_dispatch:
inputs:
server:
description: "Server"
required: true
default: "qa.orcid.org"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "server: ${{github.event.inputs.server}}"
run: |
echo "server - ${{github.event.inputs.server}}"
echo "branch - ${GITHUB_REF#refs/heads/}"
- name: Set up Python 3.9
uses: actions/setup-python@v4
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 "test_server='${{github.event.inputs.server}}'" >> 'orcid/properties.py'
echo "type='actions'" >> 'orcid/properties.py'
echo "memberClientId='${{secrets.QA_MEMBER_CLIENT_ID}}'" >> 'orcid/properties.py'
echo "memberClientSecret='${{secrets.QA_MEMBER_CLIENT_SECRET}}'" >> 'orcid/properties.py'
echo "notifyToken='${{secrets.QA_NOTIFY_TOKEN}}'" >> '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 public record
run: py.test --junitxml orcid/.py_env/Scripts/results/test_public_record.xml orcid/test_public_record.py
- name: Test limited record
run: py.test --junitxml orcid/.py_env/Scripts/results/test_limited_record.xml orcid/test_limited_record.py
- name: Test private record
run: py.test --junitxml orcid/.py_env/Scripts/results/test_public_api_read_search.xml orcid/test_private_record.py
- name: Test 2.0 API all endpoints
run: py.test --junitxml orcid/.py_env/Scripts/results/test_20api_all_endpoints.xml orcid/test_20api_all_endpoints.py
- name: Test 2.1 API all endpoints
run: py.test --junitxml orcid/.py_env/Scripts/results/test_21api_all_endpoints.xml orcid/test_21api_all_endpoints.py
- name: Test 3.0 API all endpoints
run: py.test --junitxml orcid/.py_env/Scripts/results/test_30api_all_endpoints.xml orcid/test_30api_all_endpoints.py
- name: Test 3.0 API OBO user all endpoints
run: py.test --junitxml orcid/.py_env/Scripts/results/test_30api_obo_user_all_endpoints.xml orcid/test_30api_obo_user_all_endpoints.py
- name: Test 3.0 RC API filters
run: py.test --junitxml orcid/.py_env/Scripts/results/test_30rc1api_all_endpoints.xml orcid/test_rc_api_filters.py
- name: Test scope methods
run: py.test --junitxml orcid/.py_env/Scripts/results/test_scope_methods.xml orcid/test_scope_methods.py
- name: Test read endpoints
run: py.test --junitxml orcid/.py_env/Scripts/results/test_read_endpoints.xml orcid/test_read_endpoints.py
- name: Test content negotiation
run: py.test --junitxml orcid/.py_env/Scripts/results/test_content_negotiation.xml orcid/test_content_negotiation.py
- name: Test revoked token
run: py.test --junitxml orcid/.py_env/Scripts/results/test_revoked_token.xml orcid/test_revoked_token.py