Skip to content

fix: SQlite base path not detected correctly #121

fix: SQlite base path not detected correctly

fix: SQlite base path not detected correctly #121

Workflow file for this run

name: pull_request
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Run tests
run: |
git fetch --all --prune
sudo apt-get install libgeos-dev -y
export PROJECT_PATH=$(pwd)
echo $PROJECT_PATH
ls -lahrt ${PROJECT_PATH}
python -m pip install --upgrade pip
pip install coverage runtype wheel twine setuptools
cd ${PROJECT_PATH}/equipment/framework && pip install -r requirements.txt
cd ${PROJECT_PATH}/equipment/console && pip install -r requirements.txt
cd ${PROJECT_PATH}/equipment/project && pip install -r requirements.txt
cd ${PROJECT_PATH} && python -m unittest discover -s equipment/project/
cd ${PROJECT_PATH} && coverage run -m unittest discover -p '**Test.py'
cd ${PROJECT_PATH} && coverage xml -i
sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage.xml
- name: Get PR author
id: get_author
run: echo ::set-output name=AUTHOR::${{ github.event.pull_request.user.login }}
- name: SonarCloud Scan
if: ${{ matrix.python-version == '3.10' && steps.get_author.outputs.AUTHOR == 'rogervila' }}
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.SONAR_GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.organization=rogervila-github
-Dsonar.projectKey=rogervila_equipment
-Dsonar.sources=.
-Dsonar.python.version=3.10
-Dsonar.python.coverage.reportPaths=coverage.xml
-Dsonar.exclusions=**/tests/**,**/*.html,**/*.js,**/*.css,**/stubs/**,**/_stubs/**,**/examples/**,**/project/main.py
-Dsonar.test.exclusions=**/tests/**,**/*.html,**/*.js,**/*.css,**/stubs/**,**/_stubs/**,**/examples/**,**/project/main.py
-Dsonar.tests=equipment/console/tests/,equipment/framework/tests/,equipment/project/tests/
-Dsonar.verbose=true