-
Notifications
You must be signed in to change notification settings - Fork 2
152 lines (149 loc) · 6.22 KB
/
python-test.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: Test Python Package
on:
workflow_dispatch:
workflow_call:
secrets:
TEST_API_KEY:
required: true
TEST_API_SECRET:
required: true
inputs:
TEST_API_HOST:
required: true
type: string
TEST_API_ARCHIVE_ORDERING_ID_1:
required: true
type: string
TEST_API_ARCHIVE_LICENSE_HREF_1:
required: true
type: string
TEST_API_ARCHIVE_BUNDLE_KEY_1:
required: true
type: string
TEST_API_ARCHIVE_ORDERING_ID_2:
required: true
type: string
TEST_API_ARCHIVE_LICENSE_HREF_2:
required: true
type: string
TEST_API_ARCHIVE_BUNDLE_KEY_2:
required: true
type: string
TEST_API_ORDER_ID_CAMPAIGNS:
required: true
type: string
TEST_API_ORDER_ID_DATASETS:
required: true
type: string
TEST_API_CAMPAIGN_ID:
required: true
type: string
TEST_API_DATASET_ID:
required: true
type: string
TEST_API_RESOURCE_ID:
required: true
type: string
TEST_API_COLLECTION_ID:
required: true
type: string
TEST_API_COLLECTION_ITEM_ID:
required: true
type: string
TEST_API_TASKING_ORDERING_ID_1:
required: true
type: string
TEST_API_TASKING_BUNDLE_KEY_1:
required: true
type: string
TEST_API_TASKING_LICENSE_HREF_1:
required: true
type: string
TEST_API_TASKING_PRIORITY_KEY_1:
required: true
type: string
TEST_API_TASKING_CLOUD_1:
required: true
type: string
TEST_API_TASKING_ORDERING_ID_2:
required: true
type: string
TEST_API_TASKING_BUNDLE_KEY_2:
required: true
type: string
TEST_API_TASKING_LICENSE_HREF_2:
required: true
type: string
TEST_API_TASKING_PRIORITY_KEY_2:
required: true
type: string
TEST_API_TASKING_CLOUD_2:
required: true
type: string
pull_request:
types: [opened,edited,synchronize,reopened,ready_for_review,review_requested,]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- run: pip3 install -r requirements.txt
- run: python3 -m unittest tests/test_setup.py
env:
API_KEY: ${{ secrets.TEST_API_KEY}}
API_SECRET: ${{ secrets.TEST_API_SECRET}}
API_HOST: ${{ vars.TEST_API_HOST}}
API_ARCHIVE_ORDERING_ID_1: ${{ vars.TEST_API_ARCHIVE_ORDERING_ID_1}}
API_ARCHIVE_LICENSE_HREF_1: ${{ vars.TEST_API_ARCHIVE_LICENSE_HREF_1}}
API_ARCHIVE_BUNDLE_KEY_1: ${{ vars.TEST_API_ARCHIVE_BUNDLE_KEY_1}}
API_ARCHIVE_ORDERING_ID_2: ${{ vars.TEST_API_ARCHIVE_ORDERING_ID_2}}
API_ARCHIVE_LICENSE_HREF_2: ${{ vars.TEST_API_ARCHIVE_LICENSE_HREF_2}}
API_ARCHIVE_BUNDLE_KEY_2: ${{ vars.TEST_API_ARCHIVE_BUNDLE_KEY_2}}
API_ORDER_ID_CAMPAIGNS: ${{ vars.TEST_API_ORDER_ID_CAMPAIGNS}}
API_ORDER_ID_DATASETS: ${{ vars.TEST_API_ORDER_ID_DATASETS}}
API_CAMPAIGN_ID: ${{ vars.TEST_API_CAMPAIGN_ID}}
API_DATASET_ID: ${{ vars.TEST_API_DATASET_ID}}
API_RESOURCE_ID: ${{ vars.TEST_API_RESOURCE_ID}}
API_COLLECTION_ID: ${{ vars.TEST_API_COLLECTION_ID}}
API_COLLECTION_ITEM_ID: ${{ vars.TEST_API_COLLECTION_ITEM_ID}}
API_TASKING_ORDERING_ID_1: ${{ vars.TEST_API_TASKING_ORDERING_ID_1}}
API_TASKING_BUNDLE_KEY_1: ${{ vars.TEST_API_TASKING_BUNDLE_KEY_1}}
API_TASKING_LICENSE_HREF_1: ${{ vars.TEST_API_TASKING_LICENSE_HREF_1}}
API_TASKING_PRIORITY_KEY_1: ${{ vars.TEST_API_TASKING_PRIORITY_KEY_1}}
API_TASKING_CLOUD_1: ${{ vars.TEST_API_TASKING_CLOUD_1}}
API_TASKING_ORDERING_ID_2: ${{ vars.TEST_API_TASKING_ORDERING_ID_2}}
API_TASKING_BUNDLE_KEY_2: ${{ vars.TEST_API_TASKING_BUNDLE_KEY_2}}
API_TASKING_LICENSE_HREF_2: ${{ vars.TEST_API_TASKING_LICENSE_HREF_2}}
API_TASKING_PRIORITY_KEY_2: ${{ vars.TEST_API_TASKING_PRIORITY_KEY_2}}
API_TASKING_CLOUD_2: ${{ vars.TEST_API_TASKING_CLOUD_2}}
- run: python3 -m unittest tests/test_archive.py tests/test_auth.py tests/test_collections.py tests/test_list.py tests/test_orders.py tests/test_price.py tests/test_rfc3339.py tests/test_tasking.py
env:
API_KEY: ${{ secrets.TEST_API_KEY}}
API_SECRET: ${{ secrets.TEST_API_SECRET}}
API_HOST: ${{ vars.TEST_API_HOST}}
API_ARCHIVE_ORDERING_ID_1: ${{ vars.TEST_API_ARCHIVE_ORDERING_ID_1}}
API_ARCHIVE_LICENSE_HREF_1: ${{ vars.TEST_API_ARCHIVE_LICENSE_HREF_1}}
API_ARCHIVE_BUNDLE_KEY_1: ${{ vars.TEST_API_ARCHIVE_BUNDLE_KEY_1}}
API_ARCHIVE_ORDERING_ID_2: ${{ vars.TEST_API_ARCHIVE_ORDERING_ID_2}}
API_ARCHIVE_LICENSE_HREF_2: ${{ vars.TEST_API_ARCHIVE_LICENSE_HREF_2}}
API_ARCHIVE_BUNDLE_KEY_2: ${{ vars.TEST_API_ARCHIVE_BUNDLE_KEY_2}}
API_ORDER_ID_CAMPAIGNS: ${{ vars.TEST_API_ORDER_ID_CAMPAIGNS}}
API_ORDER_ID_DATASETS: ${{ vars.TEST_API_ORDER_ID_DATASETS}}
API_CAMPAIGN_ID: ${{ vars.TEST_API_CAMPAIGN_ID}}
API_DATASET_ID: ${{ vars.TEST_API_DATASET_ID}}
API_RESOURCE_ID: ${{ vars.TEST_API_RESOURCE_ID}}
API_COLLECTION_ID: ${{ vars.TEST_API_COLLECTION_ID}}
API_COLLECTION_ITEM_ID: ${{ vars.TEST_API_COLLECTION_ITEM_ID}}
API_TASKING_ORDERING_ID_1: ${{ vars.TEST_API_TASKING_ORDERING_ID_1}}
API_TASKING_BUNDLE_KEY_1: ${{ vars.TEST_API_TASKING_BUNDLE_KEY_1}}
API_TASKING_LICENSE_HREF_1: ${{ vars.TEST_API_TASKING_LICENSE_HREF_1}}
API_TASKING_PRIORITY_KEY_1: ${{ vars.TEST_API_TASKING_PRIORITY_KEY_1}}
API_TASKING_CLOUD_1: ${{ vars.TEST_API_TASKING_CLOUD_1}}
API_TASKING_ORDERING_ID_2: ${{ vars.TEST_API_TASKING_ORDERING_ID_2}}
API_TASKING_BUNDLE_KEY_2: ${{ vars.TEST_API_TASKING_BUNDLE_KEY_2}}
API_TASKING_LICENSE_HREF_2: ${{ vars.TEST_API_TASKING_LICENSE_HREF_2}}
API_TASKING_PRIORITY_KEY_2: ${{ vars.TEST_API_TASKING_PRIORITY_KEY_2}}
API_TASKING_CLOUD_2: ${{ vars.TEST_API_TASKING_CLOUD_2}}