Skip to content

Commit 100b690

Browse files
Merge pull request #270 from splunk/develop
Merge develop into Main
2 parents 407a5d2 + eb90b08 commit 100b690

35 files changed

+2910
-98
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Python Code Style Check
2+
3+
on: [push]
4+
5+
jobs:
6+
style-check:
7+
runs-on: ubuntu-latest
8+
container: python:latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- run: |
12+
pip install black
13+
black --check ./tests/unit
14+
name: Install and run black style checker

.github/workflows/test_matrix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Test with pytest
3434
run: |
3535
export PATH="~/.pyenv/bin:$PATH"
36-
eval "$(pyenv init -)"
36+
eval "$(pyenv init -)"
3737
source ~/.poetry/env
3838
poetry install -E docker
3939
poetry run pytest -v --splunk-version=${{ matrix.splunk-version }} -m docker

.github/workflows/unit_tests.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Unit tests
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
fail-fast: false
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
submodules: true
15+
- name: Set up Python
16+
uses: actions/setup-python@v1
17+
with:
18+
python-version: 3.7
19+
- name: Install dependencies
20+
run: |
21+
sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
22+
curl https://pyenv.run | bash
23+
export PATH="~/.pyenv/bin:$PATH"
24+
eval "$(pyenv init -)"
25+
pyenv install 3.7.8
26+
pyenv local 3.7.8
27+
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
28+
source ~/.poetry/env
29+
- name: Test with pytest
30+
run: |
31+
export PATH="~/.pyenv/bin:$PATH"
32+
eval "$(pyenv init -)"
33+
source ~/.poetry/env
34+
poetry install
35+
poetry run coverage run --source=./pytest_splunk_addon/standard_lib -m pytest -v tests/unit
36+
poetry run coverage html
37+
- name: Archive test coverage results
38+
uses: actions/upload-artifact@v2
39+
with:
40+
name: code-coverage-report-unit-tests
41+
path: htmlcov

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,6 @@ venv
7979
# Vs Code Settings
8080
.vscode
8181
test_report.md
82+
83+
# Pycharm
84+
.idea/

docs/how_to_use.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,4 +300,4 @@ Extending pytest-splunk-addon
300300

301301
<hr width=100%>
302302

303-
.. [#] xfail indicates that you expect a test to fail for some reason. A common example is a test for a feature not yet implemented, or a bug not yet fixed. When a test passes despite being expected to fail, it's an xpass and will be reported in the test summary.
303+
.. [#] xfail indicates that you expect a test to fail for some reason. A common example is a test for a feature not yet implemented, or a bug not yet fixed. When a test passes despite being expected to fail, it's an xpass and will be reported in the test summary.

0 commit comments

Comments
 (0)