Skip to content

Updated libraries to resolve conflict #620

Updated libraries to resolve conflict

Updated libraries to resolve conflict #620

Workflow file for this run

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
if: >
github.event_name == 'push' ||
github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/[email protected]
with:
python-version: 3.9
- name: Upgrade pip, setuptools, and wheel
run: |
pip install --upgrade pip setuptools wheel
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Install coverage from source (no binary wheels)
run: |
pip install --no-binary :all: coverage
- name: Run unit tests with pytest
run: |
pytest --cov=yoti_python_sdk yoti_python_sdk/tests --cov-report=xml: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
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}