Skip to content

Commit

Permalink
Merge pull request #3 from IBM/feat/CI
Browse files Browse the repository at this point in the history
chore: Ensuring CI is setup correctly.
  • Loading branch information
butler54 authored Nov 11, 2021
2 parents af66c86 + d32cac4 commit 58ade78
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/conventional-pr.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "Lint PR"

on:
pull_request_target:
pull_request:
types:
- opened
- edited
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
path: coverage.xml

sonar:
if: github.repository == 'IBM/compliance-trestle'
if: github.repository == 'IBM/compliance-trestle-fedramp'
runs-on: ubuntu-latest
needs: test
steps:
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
hooks:
- id: yapf
args: [--in-place, --parallel, --recursive, --style, .yapf-config]
files: "^(trestle|tests|scripts)"
files: "^(trestle_fedramp|tests|scripts)"
stages: [commit]
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
Expand Down Expand Up @@ -64,13 +64,13 @@ repos:
flake8-bandit,
dlint
]
files: "^(trestle)"
files: "^(trestle_fedramp)"
stages: [commit]
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.10
hooks:
- id: mdformat
exclude: "CHANGELOG.md|docs/mkdocs_code_of_conduct.md|docs/api_reference|tests/data/author|docs/contributing/mkdocs_contributing.md"
exclude: "CHANGELOG.md"
additional_dependencies:
- mdformat-tables
- mdformat-config
Expand Down
12 changes: 1 addition & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
# Changelog

All notable changes to this project will be documented in this file.

## [Unreleased]

## [0.0.1] - 2019-02-15

### Added
- Added a changelog

[unreleased]: https://github.com/ibm/repo-template/compare/v0.0.1...HEAD
[0.0.1]: https://github.com/ibm/repo-template/releases/tag/v0.0.1
<!--next-version-placeholder-->
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ test::
python -m pytest --exitfirst -n auto

test-cov::
python -m pytest --cov=trestle --exitfirst -n auto -vv --cov-report=xml --cov-fail-under=96
python -m pytest --cov=trestle_fedramp --exitfirst -n auto -vv --cov-report=xml --cov-fail-under=0

test-all-random::
python -m pytest --cov=trestle --cov-report=xml --random-order
python -m pytest --cov=trestle_fedramp --cov-report=xml --random-order

test-verbose:
python -m pytest -vv -n auto
Expand Down Expand Up @@ -79,7 +79,7 @@ clean::
find . | grep -E "__pycache__|\.pyc|\.pyo" | xargs rm -rf

pylint:
pylint trestle
pylint trestle_fedramp

pylint-test:
pylint tests --rcfile=.pylintrc_tests
Expand Down
28 changes: 28 additions & 0 deletions tests/manual_tests/test_binary.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright (c) 2021 IBM Corp. All rights reserved.
#
# 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.

# This script is designed to test whether the bdist is behaving correctly.
# Note that it encodes the stanndard testing protocol and should be updated.

mkdir tmp_bin_test
python -m venv tmp_bin_test/venv
python setup.py bdist_wheel
source tmp_bin_test/venv/bin/activate
python -m pip install dist/*.whl
python -m pip install pytest-xdist
# this is required to get away from the damn base directory
cd tmp_bin_test
ln -s ../tests
python -m pytest --exitfirst -n auto

0 comments on commit 58ade78

Please sign in to comment.