-
Notifications
You must be signed in to change notification settings - Fork 0
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
Docs build workflow #27
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
6d67c9f
Added Codecov Workflow
UmairK5669 f953baf
Updated workflow
UmairK5669 dc43ba1
Updated workflow to manually install pytest/pytest-cov
UmairK5669 e1d77b0
dummy tests added
77ac46b
Updated workflow
86d37c8
Merge branch 'main' into codecov-workflow
UmairK5669 8e14eb8
Updated workflow
9147065
Updated tests to pass all
011c4d9
Structure change, threshold added and workflow update
bd42ef8
Workflow change
903a24b
Added flake8 lint workflow
8480b3d
Updated workflow to remove excluded files
95437c2
Updated workflow
8f22dd9
Removed arguments
3e2222b
Added a docs build workflow
6ae6cdc
Updated workflow
4de663d
Updated workflow to install dependencies
f82e6ee
Installing dependencies through pre-build-command
cd6fe96
Docs breaking commit to test workflow
9e4c612
Updated workflow
e9d7bf5
Updated workflow
3088acf
reverted conf.py
82fa432
Use default build command
10692d5
Added docs build breaking change to test workflow
ce2f84d
Revert breaking change
3e1f836
Removed .tox from pyproject.toml
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
target: 60% | ||
threshold: 5% | ||
if_ci_failed: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Build-codecov-docs | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry | ||
poetry lock --no-update | ||
poetry install --with test | ||
pip install pytest | ||
pip install pytest-cov | ||
|
||
- name: Run tests and collect coverage | ||
run: pytest --cov tests | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
env_vars: OS,PYTHON | ||
files: ./coverage.xml | ||
name: Coverage Report with codecov overview | ||
fail_ci_if_error: true | ||
verbose: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: "Docs Build Successfully on PR Check" | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ammaraskar/sphinx-action@0.4 | ||
with: | ||
docs-folder: "docs/" | ||
pre-build-command: pip install -U sphinx sphinx-rtd-theme | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: UserGuideHTML | ||
path: "docs/build/html/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: flake8 Lint | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
flake8-lint: | ||
runs-on: ubuntu-latest | ||
name: Flake8 Lint | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python environment | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry | ||
poetry lock --no-update | ||
poetry install | ||
pip install black | ||
pip install isort | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't Black and isort come with |
||
|
||
- name: Run Black | ||
run: black ./ --config pyproject.toml | ||
|
||
- name: Run Isort | ||
run: isort . | ||
|
||
- name: Setup flake8 annotations | ||
uses: rbialon/flake8-annotations@v1 | ||
|
||
- name: Link and annotate with Flake8 | ||
uses: py-actions/flake8@v2 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
def test_dummy(): | ||
assert True | ||
|
||
def test_another_dummy(): | ||
assert False, "This test intentionally fails" | ||
|
||
def test_addition(): | ||
assert 1 + 1 == 2 | ||
|
||
def test_subtraction(): | ||
assert 5 - 3 == 2 | ||
|
||
def test_multiplication(): | ||
assert 2 * 3 == 6 | ||
|
||
def test_division(): | ||
assert 6 / 3 == 2 | ||
|
||
def test_strings(): | ||
assert "hello" == "hello" | ||
|
||
def test_lists(): | ||
assert [1, 2, 3] == [1, 2, 3] | ||
|
||
def test_dicts(): | ||
assert {"key": "value"} == {"key": "value"} | ||
|
||
def test_none(): | ||
assert None is None |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't pytest and pytest-cov come with
poetry install --with test
?