Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
version: 2.1

orbs:
python: circleci/python@0.2.1

jobs:
build-and-test:
executor: python/default
environment:
SONARSCANNER_VERSION: "4.3.0.2102"
steps:
- checkout
# - python/load-cache
# - python/install-deps
# - python/save-cache
- run:
name: Install OpenJDK 11
command: sudo apt install openjdk-11-jdk

- run:
name: Install SonarScanner
command: |
wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONARSCANNER_VERSION.zip
unzip sonar-scanner-cli-$SONARSCANNER_VERSION.zip

- run:
name: Test
command: |
pip install pytest-cov
pytest --cov=./ --cov-report=xml

- run:
name: Run SonarScanner
command: |
echo "sonar.login="$SONAR_TOKEN >> ./sonar-project.properties
echo "sonar.pullrequest.key=7" >> ./sonar-project.properties
echo "sonar.pullrequest.branch=circleci-project-setup" >> ./sonar-project.properties
echo "sonar.pullrequest.base=master" >> ./sonar-project.properties
./sonar-scanner-$SONARSCANNER_VERSION/bin/sonar-scanner -X

workflows:
main:
jobs:
- build-and-test
2 changes: 2 additions & 0 deletions asdf.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sonar.login=asdfasdf
sonar.login=asdfasdf
3 changes: 3 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sonar.host.url=https://sonarqube.codecov.dev
sonar.projectKey=python-standard
sonar.python.coverage.reportPaths=./coverage.xml