Skip to content

Commit 139c14e

Browse files
feat!: update project to python3.9 (#913)
BREAKING CHANGE: project and dependencies update not compatible with python 3.7 --------- Co-authored-by: mbruzda <[email protected]>
1 parent bf94984 commit 139c14e

File tree

11 files changed

+643
-435
lines changed

11 files changed

+643
-435
lines changed

.github/workflows/build-test-release.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,12 @@ jobs:
7272
- uses: actions/checkout@v4
7373
with:
7474
submodules: true
75+
- uses: actions/setup-python@v5
76+
with:
77+
python-version: "3.9"
7578
- name: Install dependencies
7679
run: |
77-
curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1
80+
curl -sSL https://install.python-poetry.org | python3 - --version 2.1.4
7881
poetry install
7982
poetry run pytest -v tests/unit
8083
@@ -95,6 +98,9 @@ jobs:
9598
- uses: actions/checkout@v4
9699
with:
97100
submodules: true
101+
- uses: actions/setup-python@v5
102+
with:
103+
python-version: "3.9"
98104
- name: Setup for testing
99105
run: |
100106
mkdir test-results-${{ matrix.splunk.version }}
@@ -155,9 +161,9 @@ jobs:
155161
submodules: true
156162
- uses: actions/setup-python@v5
157163
with:
158-
python-version: 3.7
164+
python-version: "3.9"
159165
- run: |
160-
curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1
166+
curl -sSL https://install.python-poetry.org | python3 - --version 2.1.4
161167
poetry install
162168
poetry run pytest -v --splunk-version=${{ matrix.splunk.version }} -m docker -m ${{ matrix.test-marker }} tests/e2e
163169
@@ -175,15 +181,15 @@ jobs:
175181
persist-credentials: false
176182
- uses: actions/setup-python@v5
177183
with:
178-
python-version: "3.7"
184+
python-version: "3.9"
179185
- uses: actions/download-artifact@v4
180186
with:
181187
name: THIRDPARTY
182188
- name: Update Notices
183189
run: cp -f THIRDPARTY NOTICE
184190
- name: Install Poetry
185191
run: |
186-
curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1
192+
curl -sSL https://install.python-poetry.org | python3 - --version 2.1.4
187193
- id: semantic
188194
uses: splunk/[email protected]
189195
with:

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
- uses: actions/checkout@v4
1818
- uses: actions/setup-python@v5
1919
with:
20-
python-version: 3.8
20+
python-version: 3.9
2121
- run: |
22-
curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1
22+
curl -sSL https://install.python-poetry.org | python3 - --version 2.1.4
2323
pip install mkdocs mkdocs-material mkdocstrings-python
2424
- name: Deploy to GitHub Pages
2525
if: github.ref_name == 'main'

Dockerfile.tests

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ RUN export DEBIAN_FRONTEND=noninteractive ;\
2727
apt-get install -y --no-install-recommends apt-utils ;\
2828
apt-get install -y locales ;\
2929
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8;\
30-
apt-get install -y curl git python-is-python3 python3-distutils python3-pip
30+
apt-get install -y software-properties-common ;\
31+
add-apt-repository ppa:deadsnakes/ppa ;\
32+
apt-get update ;\
33+
apt-get install -y curl git python3.9 python3.9-venv python3.9-distutils ;\
34+
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3.9 get-pip.py ;
3135

3236
ENV LANG en_US.utf8
3337

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ A Dynamic test tool for Splunk Apps and Add-ons.
1010
## Usage
1111

1212
For full usage instructions, please visit the [documentation](https://splunk.github.io/pytest-splunk-addon).
13+

docker-compose-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ services:
8888
- SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN}
8989
- SPLUNK_START_ARGS=--accept-license
9090
- TEST_SC4S_ACTIVATE_EXAMPLES=yes
91+
- SPLUNK_GENERAL_TERMS=--accept-sgt-current-at-splunk-com
9192
volumes:
9293
results:
9394
external: false

docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ services:
8080
- SPLUNK_START_ARGS=--accept-license
8181
- SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN}
8282
- TEST_SC4S_ACTIVATE_EXAMPLES=yes
83+
- SPLUNK_GENERAL_TERMS=--accept-sgt-current-at-splunk-com
8384

8485
uf:
8586
build:
@@ -104,4 +105,4 @@ services:
104105

105106
volumes:
106107
splunk-sc4s-var:
107-
external: false
108+
external: false

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ which allows the user to test [knowledge objects](https://docs.splunk.com/Splexi
1111

1212
## Support
1313

14-
- **Python**: 3.7
14+
- **Python**: 3.9
1515
- **Platforms**: Linux, Windows and MacOS
1616

1717
## Installation

docs/troubleshoot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ substitutions:
2121

2222
**4. Getting Couldn't find a version that satisfies the requirement when installing pytest-splunk-addon using pip.**
2323

24-
- Use `pip3 install pytest-splunk-addon` and make sure you are using python 3.7
24+
- Use `pip3 install pytest-splunk-addon` and make sure you are using python 3.9
2525

2626
**5. While executing test cases on Docker, all the test cases abort with the following setup failure:**
2727

entrypoint.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
#!/bin/bash
22
echo args $@
33
cd /work
4-
curl https://pyenv.run | bash
5-
export PATH="~/.pyenv/bin:$PATH"
6-
eval "$(pyenv init -)"
7-
pyenv install 3.7.8
8-
pyenv local 3.7.8
9-
curl -sSL https://install.python-poetry.org | python - --version 1.5.1
4+
curl -sSL https://install.python-poetry.org | python3.9 - --version 2.1.4
105
export PATH="/root/.local/bin:$PATH"
11-
source ~/.poetry/env
126
sleep 15
137
poetry install
148
exec poetry run pytest -vv $@

0 commit comments

Comments
 (0)