Skip to content

Commit

Permalink
Merge pull request #16 from sclorg/add_long_description
Browse files Browse the repository at this point in the history
Add long_description
  • Loading branch information
phracek committed Aug 3, 2022
2 parents c3a058f + ea2653f commit d56e3ea
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 45 deletions.
41 changes: 1 addition & 40 deletions .github/workflows/pre-commit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
- master
jobs:
sanity:
name: Sanity tests
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
Expand All @@ -25,48 +24,10 @@ jobs:
sudo apt-get update && sudo apt-get -y install curl jq make git shellcheck python3 python3-pip
pip3 install pre-commit
- name: Create status check to pending
id: pending
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cat << EOF > pending.json
{
"sha": "${{ steps.sha.outputs.SHA }}",
"state": "pending",
"context": "Sanity tests"
}
EOF
echo "https://api.github.com/repos/$GITHUB_REPOSITORY/statuses/${{ steps.sha.outputs.SHA}} "
curl -X POST -H "Authorization: Bearer $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/$GITHUB_REPOSITORY/statuses/${{ steps.sha.outputs.SHA }} \
--data @pending.json
- name: Run Sanity pre-commit tests
continue-on-error: true
id: pre_commit_tests
run: |
set +e
make pre-commit-check
pre-commit run --all
echo ::set-output name=exit_status::$?
- name: Switch to final state
run: |
echo "Result from pre_commit_tests is ${{ steps.pre_commit_tests.outputs.exit_status }}"
if [[ ${{ steps.pre_commit_tests.outputs.exit_status }} == 0 ]]; then
FINAL_STATE="success"
else
FINAL_STATE="failure"
fi
cat << EOF > final.json
{
"sha": "${{ steps.sha.outputs.SHA }}",
"state": "${FINAL_STATE}",
"context": "pre-commit-tests",
"description": "Build finished"
}
EOF
cat final.json
curl -X POST -H "Authorization: Bearer ${{secrets.GITHUB_TOKEN}}" -H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/$GITHUB_REPOSITORY/statuses/${{ steps.sha.outputs.SHA }} \
--data @final.json
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pytest
flexmock
GitPython
GitPython
6 changes: 6 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
# Authors: Petr Hracek <phracek@redhat.com>

from setuptools import setup, find_packages
from pathlib import Path

this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text()


def get_requirements():
Expand All @@ -37,6 +41,8 @@ def get_requirements():
setup(
name="container-ci-suite",
description='A python3 container CI tool for testing images.',
long_description=long_description,
long_description_content_type='text/markdown',
version="0.0.3",
keywords='tool,containers,images,tests',
packages=find_packages(exclude=["tests"]),
Expand Down
5 changes: 2 additions & 3 deletions tests/test_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
import pytest


import os

from pathlib import Path
Expand All @@ -28,8 +29,6 @@

from container_ci_suite.git import Git

from tests.spellbook import TESTS_DIR


class TestContainerCISuiteGit(object):

Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ commands = python3 -m pytest --color=yes -v --showlocals tests/
deps =
pytest
flexmock
GitPython
GitPython

0 comments on commit d56e3ea

Please sign in to comment.