-
Notifications
You must be signed in to change notification settings - Fork 15
135 lines (118 loc) · 3.59 KB
/
cicd.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
name: sfeos
on:
push:
branches:
- main
pull_request:
branches:
- main
- features/**
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
services:
elasticsearch_8_svc:
image: docker.elastic.co/elasticsearch/elasticsearch:8.11.0
env:
cluster.name: stac-cluster
node.name: es01
network.host: 0.0.0.0
transport.host: 0.0.0.0
discovery.type: single-node
http.port: 9200
xpack.license.self_generated.type: basic
xpack.security.enabled: false
xpack.security.transport.ssl.enabled: false
ES_JAVA_OPTS: -Xms512m -Xmx1g
ports:
- 9200:9200
elasticsearch_7_svc:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.1
env:
cluster.name: stac-cluster
node.name: es01
network.host: 0.0.0.0
transport.host: 0.0.0.0
discovery.type: single-node
http.port: 9400
xpack.license.self_generated.type: basic
xpack.security.enabled: false
xpack.security.transport.ssl.enabled: false
ES_JAVA_OPTS: -Xms512m -Xmx1g
ports:
- 9400:9400
opensearch_2_11:
image: opensearchproject/opensearch:2.11.1
env:
cluster.name: stac-cluster
node.name: os01
network.host: 0.0.0.0
transport.host: 0.0.0.0
discovery.type: single-node
http.port: 9202
http.cors.enabled: true
plugins.security.disabled: true
plugins.security.ssl.http.enabled: true
OPENSEARCH_JAVA_OPTS: -Xms512m -Xmx512m
ports:
- 9202:9202
strategy:
matrix:
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12"]
name: Python ${{ matrix.python-version }} testing
steps:
- name: Check out repository code
uses: actions/checkout@v4
# Setup Python (faster than using Python container)
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Lint code
if: ${{ matrix.python-version == 3.11 }}
run: |
python -m pip install pre-commit
pre-commit run --all-files
- name: Install pipenv
run: |
python -m pip install --upgrade pipenv wheel
- name: Install core library stac-fastapi
run: |
pip install ./stac_fastapi/core
- name: Install elasticsearch stac-fastapi
run: |
pip install ./stac_fastapi/elasticsearch[dev,server]
- name: Install opensearch stac-fastapi
run: |
pip install ./stac_fastapi/opensearch[dev,server]
- name: Run test suite against Elasticsearch 7.x
run: |
pipenv run pytest -svvv
env:
ENVIRONMENT: testing
ES_PORT: 9400
ES_HOST: 172.17.0.1
ES_USE_SSL: false
ES_VERIFY_CERTS: false
BACKEND: elasticsearch
- name: Run test suite against Elasticsearch 8.x
run: |
pipenv run pytest -svvv
env:
ENVIRONMENT: testing
ES_PORT: 9200
ES_HOST: 172.17.0.1
ES_USE_SSL: false
ES_VERIFY_CERTS: false
BACKEND: elasticsearch
- name: Run test suite against OpenSearch 2.11.1
run: |
pipenv run pytest -svvv
env:
ENVIRONMENT: testing
ES_PORT: 9202
ES_HOST: 172.17.0.1
ES_USE_SSL: false
ES_VERIFY_CERTS: false
BACKEND: opensearch