Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hypha
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ots
hypha
Commits
a65345a4
Commit
a65345a4
authored
2 years ago
by
Saurabh Kumar
Browse files
Options
Downloads
Patches
Plain Diff
make the makefile more readable
Break test target into smaller targets
parent
189292c5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Makefile
+19
-4
19 additions, 4 deletions
Makefile
with
19 additions
and
4 deletions
Makefile
+
19
−
4
View file @
a65345a4
...
@@ -3,7 +3,9 @@ help:
...
@@ -3,7 +3,9 @@ help:
@
echo
"Usage:"
@
echo
"Usage:"
@
echo
" make help prints this help."
@
echo
" make help prints this help."
@
echo
" make lint run all python linting."
@
echo
" make lint run all python linting."
@
echo
" make test run all python linting and test"
@
echo
" make test run linting and test and generate html coverage report"
@
echo
" make py-test run all python tests and display coverage"
@
echo
" make cov-html generate html coverage report"
@
echo
" make sort run the isort import linter."
@
echo
" make sort run the isort import linter."
@
echo
" make sort-fix fix import sort order."
@
echo
" make sort-fix fix import sort order."
@
echo
" make style run the python code style linter."
@
echo
" make style run the python code style linter."
...
@@ -23,7 +25,20 @@ sort-fix:
...
@@ -23,7 +25,20 @@ sort-fix:
style
:
style
:
@
echo
"Checking code style with flake8"
&&
flake8 .
@
echo
"Checking code style with flake8"
&&
flake8 .
test
:
lint
.PHONY
:
cov-htmlcov
pytest
--reuse-db
--cov
--cov-report
term:skip-covered
cov-html
:
ifneq
("$(wildcard .coverage)","")
@
rm
-rf
htmlcov
@
rm
-rf
htmlcov
coverage html
@
echo
"Generate html coverage report..."
&&
coverage html
@
echo
"Open 'htmlcov/index.html' in your browser to see the report."
else
$(
error Unable to generate html coverage report, please run
'make test'
or
'make py-test'
)
endif
.PHONY
:
py-test
py-test
:
@
echo
"Running python tests"
pytest
--reuse-db
--cov
--cov-report
term:skip-covered
.PHONY
:
test
test
:
lint py-test cov-html
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment