Skip to content

Commit

Permalink
updated yml file, no need of build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nicomaht committed Mar 26, 2024
1 parent 3265973 commit 4de7be9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 44 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/build.yml

This file was deleted.

32 changes: 21 additions & 11 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,37 @@ jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
fetch-depth: 0 # fetch all history for all branches and tags
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip \
install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
# stop the build if there are Python syntax \
errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 \
--show-source --statistics
# exit-zero treats all errors as warnings. \
The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 \
--max-line-length=127 --statistics
- name: Test with pytest # Using --cov=. --cov-report=xml to create a coverage and export it as an xml file
run: |
pytest
pytest --cov=. --cov-report=xml
- name: SonarCloud Scan # Add a SonarCloud Scan step to make the connection with SonarCloud
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

build-docker-image:
runs-on: ubuntu-latest
Expand Down
17 changes: 4 additions & 13 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
sonar.projectKey=Nicomatox_Industrialisation-tp2
sonar.organization=nicomatox

# This is the name and version displayed in the SonarCloud UI.
#sonar.projectName=Industrialisation-tp2
#sonar.projectVersion=1.0


# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
#sonar.sources=.

# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8
sonar.python.coverage.reportPaths \
=coverage.xml
sonar.coverage.exclusions= \
**/tests/**,**/controller/**,setup.py,test_wheel.py

0 comments on commit 4de7be9

Please sign in to comment.