-
Notifications
You must be signed in to change notification settings - Fork 0
Chander pal patch 1 #3
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
Open
chander-pal
wants to merge
15
commits into
main
Choose a base branch
from
chander-pal-patch-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
ed1ec4f
Create pr-workflow.yml
chander-pal 643c701
Create requirements.txt
chander-pal 42ad7b4
Create test_example.py
chander-pal 102c9e7
Update pr-workflow.yml
chander-pal 3b85589
Update pr-workflow.yml
chander-pal b17378b
Update pr-workflow.yml
chander-pal 558f306
Update pr-workflow.yml
chander-pal 4db1270
Update pr-workflow.yml
chander-pal 7b3e65f
Update requirements.txt
chander-pal 3a6f811
Added Mkdocs
chander-pal f27b42c
Added Mkdocs
chander-pal 73924ce
Fixed Tests
chander-pal d9f9834
Fixed Tests
chander-pal 5dac7bc
Fixed Tests
chander-pal 56dd4ee
Fixed Tests
chander-pal 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 hidden or 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,51 @@ | ||
| name: PR Workflow | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize] | ||
|
|
||
| jobs: | ||
| build-and-test: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.9' # Change this to the version you need | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
|
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. test |
||
| python -m pip install --upgrade pip | ||
| pip install -r requirements.txt # Assuming you have a requirements file | ||
|
|
||
| - name: Deploy to GitHub Pages | ||
| run: mkdocs gh-deploy --force | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Run tests | ||
| run: | | ||
| pytest tests/ # Adjust path if tests are located elsewhere | ||
|
|
||
|
|
||
| - name: Post PR Comment if Tests Fail | ||
| if: failure() | ||
| uses: actions/github-script@v6 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| script: | | ||
| const issueNumber = context.payload.pull_request ? context.payload.pull_request.number : null; | ||
| if (issueNumber) { | ||
| await github.rest.issues.createComment({ | ||
| issue_number: issueNumber, | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| body: "⚠️ Tests failed! Please review the logs and make necessary changes." | ||
| }); | ||
| } else { | ||
| console.log("No PR context found; skipping comment."); | ||
| } | ||
This file contains hidden or 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,17 @@ | ||
| # Welcome to MkDocs | ||
|
|
||
| For full documentation visit [mkdocs.org](https://www.mkdocs.org). | ||
|
|
||
| ## Commands | ||
|
|
||
| * `mkdocs new [dir-name]` - Create a new project. | ||
| * `mkdocs serve` - Start the live-reloading docs server. | ||
| * `mkdocs build` - Build the documentation site. | ||
| * `mkdocs -h` - Print help message and exit. | ||
|
|
||
| ## Project layout | ||
|
|
||
| mkdocs.yml # The configuration file. | ||
| docs/ | ||
| index.md # The documentation homepage. | ||
| ... # Other markdown pages, images and other files. |
This file contains hidden or 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,8 @@ | ||
| site_name: "Your Project Documentation" | ||
| theme: | ||
| name: material | ||
| nav: | ||
| - Home: index.md | ||
| - Guide: guide.md | ||
| - API Reference: api.md | ||
|
|
This file contains hidden or 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,6 @@ | ||
| pytest==7.2.0 | ||
| flake8==5.0.4 | ||
| requests==2.31.0 | ||
| mkdocs | ||
| mkdocs-material | ||
|
|
This file contains hidden or 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,9 @@ | ||
|
|
||
|
|
||
| def test_add(): | ||
| assert 2+3 == 5 | ||
|
|
||
|
|
||
| def test_multiply(): | ||
| assert 2*3 == 6 | ||
|
|
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.
check