Skip to content

Commit

Permalink
Update build scripts (#358)
Browse files Browse the repository at this point in the history
* Use new azure project name cr-github
* Move pytest command line args to setup.cfg
  • Loading branch information
vsalvino authored Aug 29, 2020
1 parent 723d67c commit 10dd106
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ci/compare-codecov.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ with multiple pipelines.
param(
[string] $wd = (Get-Item (Split-Path $PSCommandPath -Parent)).Parent,
[string] $org = "coderedcorp",
[string] $project = "coderedcms",
[string] $project = "cr-github",
[string] $pipeline_name = "coderedcms"
)

Expand Down
2 changes: 1 addition & 1 deletion ci/run-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Push-Location $projectDir
$ExitCode = 0

# Run unit tests.
pytest coderedcms/ --ds=coderedcms.tests.settings --junitxml=junit/test-results.xml --cov=coderedcms --cov-report=xml --cov-report=html
pytest coderedcms/
$ExitCode = $LastExitCode

# Print code coverage if succeeded.
Expand Down
13 changes: 6 additions & 7 deletions docs/contributing/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,10 @@ A Note on Cross-Platform Support
CodeRed CMS works equally well on Windows, macOS, and Linux. When adding new features
or new dependencies, ensure that these utilize proper cross-platform utilities in Python.

To ease local development of CodeRed CMS, we have many automation scripts using
`PowerShell Core <https://github.com/powershell/powershell>`_ because it provides high quality
commercial support for Windows, macOS, and Linux. Throughout this contributing guide,
you will encounter various PowerShell scripts which always provide the easiest and most
definitive way of working on CodeRed CMS.
To ease local development of CodeRed CMS, we have some automation scripts using
cross-platform `PowerShell Core <https://github.com/powershell/powershell>`_.
Throughout this contributing guide, you will encounter various PowerShell
scripts which provide an easy way of running quality control measures.

Our goal is that users of any platform can develop or host a CodeRed CMS website easily.

Expand Down Expand Up @@ -133,7 +132,7 @@ report and code coverage report:

.. code-block:: console
$ pytest coderedcms/ --ds=coderedcms.tests.settings --junitxml=junit/test-results.xml --cov=coderedcms --cov-report=xml --cov-report=html
$ pytest coderedcms/
Or more conveniently, run the PowerShell script, which will also print out the
code coverage percentage in the console:
Expand Down Expand Up @@ -204,7 +203,7 @@ codebase, run:
Alternatively, our continuous integration only analyzes the diff between your
changes and master. To analyze just the diff of your current changes, run the
`PowerShell Core <https://github.com/powershell/powershell>`_ script:
PowerShell script:

.. code-block:: console
Expand Down
7 changes: 7 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
[flake8]
exclude = coderedcms/project_template/*,*/migrations/*,schema.py
max-line-length = 100

[tool:pytest]
DJANGO_SETTINGS_MODULE = coderedcms.tests.settings
addopts = --cov coderedcms --cov-report html --cov-report xml --junitxml junit/test-results.xml
python_files = tests.py test_*.py
junit_family = xunit2
junit_suite_name = coderedcms

0 comments on commit 10dd106

Please sign in to comment.