-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Github Action CI workflow Addded Codecov for code coverage Remove Travis CI and Coveralls Added Flake8
- Loading branch information
Parth Shandilya
committed
Oct 12, 2020
1 parent
252b3fb
commit 92404ce
Showing
9 changed files
with
215 additions
and
67 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,19 @@ | ||
[flake8] | ||
max-line-length = 89 | ||
|
||
exclude = | ||
build | ||
dist | ||
docs | ||
coverage.xml | ||
cernopendata_client.egg-info | ||
.*/ | ||
env/ | ||
.git | ||
__pycache__ | ||
|
||
ignore = E203, E231, E266, E501, W503, F403, F401, W605 | ||
|
||
max-complexity = 18 | ||
|
||
select = B,C,E,F,W,T4,B9 |
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,137 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: master | ||
pull_request: | ||
branches: master | ||
|
||
jobs: | ||
Lint-black: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Check Python code formatting | ||
run: | | ||
pip install black | ||
./run-tests.sh --check-black | ||
Lint-pydocstyle: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Check compliance with Python docstring conventions | ||
run: | | ||
pip install pydocstyle | ||
./run-tests.sh --check-pydocstyle | ||
Lint-flake8: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Check compliance with pep8, pyflakes and circular complexity | ||
run: | | ||
pip install flake8 | ||
./run-tests.sh --check-flake8 | ||
Lint-check-manifest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Check Python manifest completeness | ||
run: | | ||
pip install check-manifest | ||
./run-tests.sh --check-manifest | ||
Docs-sphinx: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install system dependencies | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt install libcurl4-openssl-dev libssl-dev | ||
sudo apt-get install libgnutls28-dev | ||
- name: Install Python dependencies | ||
run: | | ||
pip install --upgrade pip setuptools py | ||
pip install -e .[all] | ||
- name: Run Sphinx documentation with doctests | ||
run: ./run-tests.sh --check-sphinx | ||
|
||
Python-tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [2.7, 3.6, 3.7, 3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install system dependencies | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt install libcurl4-openssl-dev libssl-dev | ||
sudo apt-get install libgnutls28-dev | ||
- name: Install Python dependencies | ||
run: | | ||
pip install --upgrade pip setuptools py | ||
pip install -e .[all] | ||
- name: Run pytest | ||
run: ./run-tests.sh --pytest | ||
|
||
- name: Codecov Coverage | ||
if: matrix.python-version == 3.8 | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: coverage.xml | ||
|
||
Docker-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Build and Run | ||
run: | | ||
docker build -t cernopendata/cernopendata-client . | ||
docker run --rm cernopendata/cernopendata-client version |
This file was deleted.
Oops, something went wrong.
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
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
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
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,20 @@ | ||
codecov: | ||
require_ci_to_pass: yes | ||
|
||
coverage: | ||
precision: 2 | ||
round: down | ||
range: "80...100" | ||
|
||
parsers: | ||
gcov: | ||
branch_detection: | ||
conditional: yes | ||
loop: yes | ||
method: no | ||
macro: no | ||
|
||
comment: | ||
layout: "reach,diff,flags,tree" | ||
behavior: default | ||
require_changes: no |
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
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