-
Notifications
You must be signed in to change notification settings - Fork 4
70 lines (68 loc) · 3.84 KB
/
step1-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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@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 "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