Skip to content

Commit 018dee6

Browse files
committed
enable github actions, fix test proxy
1 parent 2806f16 commit 018dee6

File tree

4 files changed

+49
-1
lines changed

4 files changed

+49
-1
lines changed

.github/workflows/python-app.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Python application
5+
6+
on:
7+
push:
8+
branches: [ main ]
9+
pull_request:
10+
branches: [ main ]
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
build:
17+
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v3
22+
- name: Set up Python 3.10
23+
uses: actions/setup-python@v3
24+
with:
25+
python-version: "3.10"
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install flake8 pytest
30+
pip install -r requirements.txt
31+
pip install -e .
32+
- name: Lint with flake8
33+
run: |
34+
# stop the build if there are Python syntax errors or undefined names
35+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
36+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
37+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
38+
- name: Test with pytest
39+
run: |
40+
pytest

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,8 @@ dmypy.json
130130

131131
# Project specific
132132
configurable_http_proxy/version.txt
133+
/.idea/configurable-http-proxy.iml
134+
/.idea/inspectionProfiles/profiles_settings.xml
135+
/.idea/misc.xml
136+
/.idea/modules.xml
137+
/.idea/vcs.xml

.idea/.gitignore

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configurable_http_proxy_test/test_proxy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ async def get(self, path=None):
3232
}
3333
self.set_status(200)
3434
self.set_header("Content-Type", "application/json")
35-
if self.get_argument("with_set_cookie"):
35+
if self.get_argument("with_set_cookie", None):
3636
# Values that set-cookie can take:
3737
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie
3838
values = {

0 commit comments

Comments
 (0)