Skip to content

Commit

Permalink
Updated libraries to resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmet-yoti committed Nov 29, 2024
1 parent 4c69b09 commit dfcdc6a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 33 deletions.
29 changes: 8 additions & 21 deletions .github/workflows/sonar.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
name: Sonar Scan

on: [push, pull_request_target]

jobs:
sonar:
name: Sonar Scan
runs-on: ubuntu-latest

# Conditions to only run when push event or pull_request from a fork
# always run on push events
# only run on pull_request_target event when pull request pulls from fork repository
if: >
github.event_name == 'push' ||
github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository
Expand All @@ -21,28 +20,16 @@ jobs:
with:
python-version: 3.9

- name: Upgrade pip, setuptools, and wheel
run: |
pip install --upgrade pip setuptools wheel
- run: pip install -r requirements.txt

- name: Install dependencies
run: |
pip install -r requirements.txt
- run: pip install -e .[dev]

- name: Install coverage from source (no binary wheels)
run: |
pip install --no-binary :all: coverage
- run: pytest --cov=yoti_python_sdk yoti_python_sdk/tests --cov-report=xml:coverage-reports/coverage-new.xml

- name: Run unit tests with pytest
run: |
pytest --cov=yoti_python_sdk yoti_python_sdk/tests --cov-report=xml:coverage-reports/coverage-new.xml
- run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage-reports/coverage-new.xml

- name: Modify coverage path for SonarQube compatibility
run: |
sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage-reports/coverage-new.xml
- name: Run SonarQube scan
uses: sonarsource/sonarcloud-github-action@master
- uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

15 changes: 3 additions & 12 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,18 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, "3.10"]
python-version: [3.7]

steps:
- uses: actions/checkout@v2

- name: Set up pyenv
uses: tiangolo/pyenv-action@v2
with:
python-version: "3.9" # specify your desired Python version here

- uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}

- name: Upgrade pip, setuptools, and wheel
run: |
pip install --upgrade pip setuptools wheel
- run: pip install -U setuptools

- name: Install dependencies
run: |
pip install -r requirements.txt
- run: pip install -r requirements.txt

- run: pip install -e .[dev]

Expand Down

0 comments on commit dfcdc6a

Please sign in to comment.