-
Notifications
You must be signed in to change notification settings - Fork 5
Bump requests, fix tests #19
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
640fa67
bump requests, fix tests
okokes-r7 9b74221
black check TODO
okokes-r7 8b5a811
use an up-to-date ruby action
okokes-r7 8836a78
pin patch
okokes-r7 b212972
latest mdl needs ruby 2.7+
okokes-r7 f0e1d57
looks like 3.4 will work
okokes-r7 2fdad82
newline
okokes-r7 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 |
|---|---|---|
| @@ -1,24 +1,31 @@ | ||
| name: Python Lint | ||
|
|
||
| on: [push] | ||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - master | ||
|
|
||
| jobs: | ||
| build: | ||
|
|
||
| runs-on: ubuntu-latest | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.10", "3.11", "3.12", "3.13"] | ||
| steps: | ||
| - uses: actions/checkout@v1 | ||
| - name: Set up Python 3.7 | ||
| uses: actions/setup-python@v1 | ||
| with: | ||
| python-version: 3.7 | ||
| - name: Install flake8 dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| - name: Lint with flake8 | ||
| run: | | ||
| pip install flake8 | ||
| # stop the build if there are Python syntax errors or undefined names | ||
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
| # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
| flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Install flake8 dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| # TODO: check black formatting (once we reformat the repo) | ||
| - name: Lint with flake8 | ||
| run: | | ||
| pip install flake8 | ||
| # stop the build if there are Python syntax errors or undefined names | ||
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
| # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
| flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics |
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
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
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 |
|---|---|---|
| @@ -1,20 +1,25 @@ | ||
| name: Tests | ||
|
|
||
| on: [push] | ||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - master | ||
|
|
||
| jobs: | ||
| build: | ||
|
|
||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.10", "3.11", "3.12", "3.13"] | ||
| steps: | ||
| - uses: actions/checkout@v1 | ||
| - name: Set up Python 3.8 | ||
| uses: actions/setup-python@v1 | ||
| with: | ||
| python-version: 3.8 | ||
| - name: Install Dependencies | ||
| run: pip install -r requirements.txt | ||
| - name: Test with pytest | ||
| run: | | ||
| pip install pytest | ||
| pytest tests/test.py | ||
| - uses: actions/checkout@v5 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Install Dependencies | ||
| run: pip install -r requirements.txt | ||
| - name: Test | ||
| run: | | ||
| make test |
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 |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| repos: | ||
| - repo: https://github.com/psf/black | ||
| rev: 19.10b0 | ||
| rev: 25.1.0 | ||
| hooks: | ||
| - id: black | ||
| types: [python] | ||
| language_version: python3.7 | ||
| language_version: python3.13 |
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
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
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
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
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 |
|---|---|---|
| @@ -1,2 +1 @@ | ||
| urllib3==1.25.7 | ||
| requests~=2.0 | ||
| requests==2.32.5 | ||
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,19 @@ | ||
| import unittest | ||
| from github_status_checker.controllers.commands import Commands | ||
|
|
||
| COMPONENT_TARGETS = [ | ||
| "git", | ||
| "api", | ||
| "webhooks", | ||
| "issues_prs_projects", | ||
| "actions", | ||
| "packages", | ||
| "pages" | ||
| ] | ||
|
|
||
| class TestComponentCheck(unittest.TestCase): | ||
| def test_check_runs_for_all_components(self): | ||
| for component in COMPONENT_TARGETS: | ||
| with self.subTest(component=component): | ||
| # Should not raise for valid components, will reach out to the real API | ||
| Commands.check(component_arg=component) |
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
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.
Uh oh!
There was an error while loading. Please reload this page.