Skip to content

Commit 9fa70cc

Browse files
authored
Merge pull request #18 from infobip/infobip/ib-tjuhasz-workflows
Build, Snyk, Sonar workflows, bumped dependencies.
2 parents 8468ac9 + 7798015 commit 9fa70cc

File tree

9 files changed

+105
-5
lines changed

9 files changed

+105
-5
lines changed

.github/workflows/build.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Python build
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Set up Python ${{ matrix.python-version }}
14+
uses: actions/setup-python@v5
15+
with:
16+
python-version: ${{ matrix.python-version }}
17+
- name: Install pip
18+
run: python -m pip install --upgrade pip
19+
- name: Install dependencies
20+
run: pip install -r requirements.txt
21+
- name: Install dependencies
22+
run: pip install -r test-requirements.txt
23+
- name: Install build
24+
run: python -m pip install build
25+
- name: Run tests
26+
run: python -m pytest

.github/workflows/snyk.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Snyk vulnerability scan
2+
3+
on: push
4+
jobs:
5+
security:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@master
9+
- name: Run Snyk to check for vulnerabilities
10+
uses: snyk/actions/python@master
11+
continue-on-error: true
12+
env:
13+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
14+
with:
15+
args: --sarif-file-output=snyk.sarif
16+
--severity-threshold=high
17+
- name: Upload result to GitHub Code Scanning
18+
uses: github/codeql-action/upload-sarif@v3
19+
with:
20+
sarif_file: snyk.sarif

.github/workflows/sonar.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: SonarCloud analysis
2+
3+
on: [push]
4+
5+
jobs:
6+
sonarcloud:
7+
name: SonarCloud
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: [ "3.8" ]
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up Python ${{ matrix.python-version }}
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: ${{ matrix.python-version }}
18+
- name: Install tox
19+
run: pip install tox
20+
- name: Run tox
21+
run: tox -e py
22+
- name: SonarCloud Scan
23+
uses: SonarSource/sonarcloud-github-action@master
24+
env:
25+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

CHANGELOG.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,18 @@ and this library adheres to [Semantic Versioning](http://semver.org/) as mention
1010
⚠ IMPORTANT NOTE: From this point onward Python 3.7 is no longer supported. The minimum supported version is Python 3.8 due to dependency updates.
1111

1212
### Added
13-
- `calls.md` which contains examples and explanations for the Calls API
13+
- `calls.md` which contains examples and explanations for the Calls API.
14+
- `build.yml` workflow to ensure project build and test integrity.
15+
- `snyk.yml` workflow, which serves the purpose of identifying and addressing dependency vulnerabilities in the project.
16+
- `sonar.yml` workflow to analyze the source code, enhancing code quality and maintainability.
1417

1518
### Security
16-
* Bumped werkzeug dependency from 2.1.2 to 3.0.3
17-
* Bumped pytest-httpserver dependency from 1.0.4 to 1.0.8
19+
- Bumped werkzeug dependency from `2.1.2` to `3.0.3`.
20+
- Bumped pytest-httpserver dependency from `1.0.4` to `1.0.8`.
21+
- Bumped setuptools dependency to `72.1.0`.
22+
23+
### Removed
24+
- `wheel` dependency due to an upgrade of `setuptools` to version `72.0.1`. As of `setuptools` version `70.1`, it is no longer necessary to have `wheel` installed for functionality.
1825

1926
## [ [4.0.0](https://github.com/infobip/infobip-api-python-client/releases/tag/4.0.0) ] - 2024-06-13
2027
🎉 **NEW Major Version of `infobip_api_client`.**

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<img src="https://cdn-web.infobip.com/uploads/2023/01/Infobip-logo.svg" height="93px" alt="Infobip" />
44

55
[![Pypi index](https://badgen.net/pypi/v/infobip-api-python-client)](https://pypi.org/project/infobip-api-python-client/)
6+
[![Snyk](https://snyk.io/test/github/infobip/infobip-api-python-client/badge.svg)](https://snyk.io/test/github/infobip/infobip-api-python-client)
67
[![MIT License](https://badgen.net/github/license/infobip/infobip-api-python-client)](https://opensource.org/licenses/MIT)
78

89
This is a Python package for Infobip API and you can use it as a dependency to add [Infobip APIs][apidocs] to your application.

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
python_dateutil >= 2.5.3
2-
setuptools >= 21.0.0
2+
setuptools >= 72.1.0
33
urllib3 >= 1.25.3, < 2.1.0
44
pydantic >= 2
55
typing-extensions >= 4.7.1

sonar-project.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
sonar.projectKey=infobip_infobip-api-python-client
2+
sonar.organization=infobip
3+
4+
sonar.python.coverage.reportPaths=coverage.xml

test-requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ pytest==6.2.5
22
pytest-httpserver==1.0.8
33
pytest-cases==3.6.8
44
pytest-cov==3.0.0
5-
wheel==0.38.0
65
werkzeug==3.0.3

tox.ini

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[tox]
2+
envlist = py38
3+
skipsdist = True
4+
5+
[testenv]
6+
deps =
7+
pytest
8+
coverage
9+
commands =
10+
pip install -r requirements.txt
11+
pip install -r test-requirements.txt
12+
coverage run -m pytest
13+
coverage xml
14+
15+
[coverage:run]
16+
relative_files = True
17+
source = infobip_api_client/
18+
branch = True

0 commit comments

Comments
 (0)