Skip to content
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

Removed wrong comment #4

Merged
merged 7 commits into from
Nov 9, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/pr_approval.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Style checks
run: make style
- name: Docstrings checks
run: make doc-check
run: make docs-style
- name: Unit tests
run: make unit_tests
- name: Unit tests coverage
Expand Down
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ coverage: ## Calculate unit test code coverage for the whole repository
coverage-report: ## Generate HTML pages with unit test code coverage report
export PATH=tools/:$$PATH;export PYTHONDONTWRITEBYTECODE=1;pytest -v -p no:cacheprovider --cov features/ --cov-report=html

style: code-style docs-style shellcheck ## Perform all style checks
style: code-style docs-style ## Perform all style checks

code-style: ## Check code style for all Python sources from this repository
python3 tools/run_pycodestyle.py
Expand All @@ -22,10 +22,6 @@ ruff: ## Run Ruff linter
docs-style: ## Check documentation strings in all Python sources from this repository
pydocstyle .

doc-check: ## Run gen_scenario_list.py to generate docs file and compare it to current one
python3 tools/gen_scenario_list.py > tmp.md
diff tmp.md docs/scenarios_list.md

shellcheck: ## Run shellcheck
./shellcheck.sh

Expand Down
30 changes: 15 additions & 15 deletions pr_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ export IQE_MARKER_EXPRESSION="smoke"
export IQE_FILTER_EXPRESSION=""
export IQE_CJI_TIMEOUT="30m"

# Install bonfire repo/initialize
CICD_URL=https://raw.githubusercontent.com/RedHatInsights/bonfire/master/cicd
curl -s $CICD_URL/bootstrap.sh > .cicd_bootstrap.sh && source .cicd_bootstrap.sh

# Build the image and push to quay
source $CICD_ROOT/build.sh

# Run the unit tests with an ephemeral db
# source $APP_ROOT/unit_test.sh

# Deploy rbac to an ephemeral namespace for testing
source $CICD_ROOT/deploy_ephemeral_env.sh

# Run smoke tests with ClowdJobInvocation
source $CICD_ROOT/cji_smoke_test.sh
## # Install bonfire repo/initialize
## CICD_URL=https://raw.githubusercontent.com/RedHatInsights/bonfire/master/cicd
## curl -s $CICD_URL/bootstrap.sh > .cicd_bootstrap.sh && source .cicd_bootstrap.sh
##
## # Build the image and push to quay
## source $CICD_ROOT/build.sh
##
## # Run the unit tests with an ephemeral db
## # source $APP_ROOT/unit_test.sh
##
## # Deploy rbac to an ephemeral namespace for testing
## source $CICD_ROOT/deploy_ephemeral_env.sh
##
## # Run smoke tests with ClowdJobInvocation
## source $CICD_ROOT/cji_smoke_test.sh
5 changes: 5 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[pycodestyle]
max-line-length = 100

[pydocstyle]
ignore = D211, D212, D213, E402
23 changes: 23 additions & 0 deletions shellcheck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
# Copyright 2020 Red Hat, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

if ! command -v shellcheck > /dev/null 2>&1; then
scversion="stable" # or "v0.4.7", or "latest"
wget -qO- "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv
shellcheck-stable/shellcheck --version
shellcheck-stable/shellcheck --exclude=SC2230 -- *.sh
else
shellcheck --exclude=SC2230 -- *.sh
fi
3 changes: 2 additions & 1 deletion test/command_line_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Module containing unit tests for the `Consumer` class."""
"""Command line flags unit tests."""

import sys
import pytest

Expand Down