Skip to content

Migrating to CodeClimate #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 10, 2021
Merged
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
12 changes: 11 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
runs-on: ubuntu-latest
if: "!startsWith(github.event.head_commit.message, 'chore') && !startsWith(github.ref, 'refs/tags/v')"
strategy:
max-parallel: 2
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
Expand All @@ -41,7 +42,16 @@ jobs:
run: make setup

- name: running unit tests
run: make test-unit
run: tox

- name: publishing code coverage report to codeclimate
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
build/publishCodeCoverage.sh

- name: running integration tests
env:
Expand Down
59 changes: 0 additions & 59 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![PyPi](https://badge.fury.io/py/ibm-scc.svg)](https://pypi.python.org/pypi/ibm-scc/)
[![PyPi](https://img.shields.io/pypi/dw/ibm-scc.svg)](https://pypi.python.org/pypi/ibm-scc/)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![codecov](https://codecov.io/gh/IBM/scc-python-sdk/branch/main/graph/badge.svg?token=U0DC9HWWOA)](https://codecov.io/gh/IBM/scc-python-sdk)
[![Test Coverage](https://api.codeclimate.com/v1/badges/a87748d845549d045483/test_coverage)](https://codeclimate.com/github/IBM/scc-python-sdk/test_coverage)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
# IBM Cloud Security & Compliance Center Python SDK Version 1.1.1

Expand Down
10 changes: 10 additions & 0 deletions build/publishCodeCoverage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# This script will publish code coverage info for a build of the master branch
# or a tagged release.


printf ">>>>> Publishing code coverage info\n"

./cc-test-reporter format-coverage --prefix "/${pwd}/" --input-type coverage.py --output coverage.json -d
./cc-test-reporter upload-coverage --input coverage.json -d
6 changes: 0 additions & 6 deletions codecov.yml

This file was deleted.

3 changes: 1 addition & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# test dependencies
codecov>=2.1.0,<3.0.0
tox-gh-actions
coverage>=4.5.4
pylint>=2.6.0,<3.0.0
pytest>=6.2.1,<7.0.0
pytest-cov>=2.2.1,<3.0.0
pytest-rerunfailures>=3.1
responses>=0.12.1,<1.0.0
tox>=3.2.0,<4.0.0

10 changes: 8 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
[tox]
envlist = py37-lint, py36, py37, py38, py39

[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39

[testenv:py37-lint]
basepython = python3.7
deps = pylint
Expand All @@ -9,8 +16,7 @@ commands = pylint --rcfile=.pylintrc ibm_scc test/unit test/integration examples
[testenv]
passenv = TOXENV CI TRAVIS* ACCOUNT_ID PROVIDER_ID
commands =
py.test --reruns 3 --cov=ibm_scc {posargs} test/unit
codecov -e TOXENV
py.test --reruns 3 --cov=ibm_scc {posargs} test/unit --cov-report=xml
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements-dev.txt
Expand Down