-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #183 from Mrgove10/githubactions
Github actions
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: blask Build | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- githubactions | ||
|
||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Clone repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup python 3.6 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.6' # Version range or exact version of a Python version to use, using SemVer's version range syntax | ||
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified | ||
|
||
- name: Setup sonarqube | ||
uses: warchant/setup-sonar-scanner@v1 | ||
|
||
- name: pip install | ||
run : | | ||
pip install -r requirements.txt | ||
pip install pylint | ||
- name: Code coverage | ||
run : export PYTHONPATH=$PYTHONPATH:$(pwd) && pytest --cov=Blask --cov-report=xml && pylint Blask --exit-zero | ||
|
||
- name: Sonar cube | ||
run: sonar-scanner -Dsonar.login=$SONAR_TOKEN -Dsonar.projectKey=blask-project-key -Dsonar.sources=Blask/ -Dsonar.organization=zerasul-github -Dsonar.python.coverage.reportPaths=coverage.xml -Dsonar.projectName=Blask |