-
-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from cytopia/release-0.0.10
Release 0.0.10
- Loading branch information
Showing
29 changed files
with
6,624 additions
and
7,453 deletions.
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,30 @@ | ||
--- | ||
|
||
### | ||
### Code style | ||
### | ||
|
||
name: black | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: False | ||
matrix: | ||
target: | ||
- black | ||
name: "[ ${{ matrix.target }} ]" | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@master | ||
|
||
- name: "${{ matrix.target }}" | ||
run: | | ||
make ${{ matrix.target }} |
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,30 @@ | ||
--- | ||
|
||
### | ||
### Code style | ||
### | ||
|
||
name: mypy | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: False | ||
matrix: | ||
target: | ||
- mypy | ||
name: "[ ${{ matrix.target }} ]" | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@master | ||
|
||
- name: "${{ matrix.target }}" | ||
run: | | ||
make ${{ matrix.target }} |
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,30 @@ | ||
--- | ||
|
||
### | ||
### Code style | ||
### | ||
|
||
name: pycode | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: False | ||
matrix: | ||
target: | ||
- pycodestyle | ||
name: "[ ${{ matrix.target }} ]" | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@master | ||
|
||
- name: "${{ matrix.target }}" | ||
run: | | ||
make ${{ matrix.target }} |
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,30 @@ | ||
--- | ||
|
||
### | ||
### Code style | ||
### | ||
|
||
name: pydoc | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: False | ||
matrix: | ||
target: | ||
- pydocstyle | ||
name: "[ ${{ matrix.target }} ]" | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@master | ||
|
||
- name: "${{ matrix.target }}" | ||
run: | | ||
make ${{ matrix.target }} |
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,30 @@ | ||
--- | ||
|
||
### | ||
### Code style | ||
### | ||
|
||
name: pylint | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: False | ||
matrix: | ||
target: | ||
- pylint | ||
name: "[ ${{ matrix.target }} ]" | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@master | ||
|
||
- name: "${{ matrix.target }}" | ||
run: | | ||
make ${{ matrix.target }} |
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,46 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
set -u | ||
set -o pipefail | ||
|
||
SCRIPT_PATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | ||
|
||
TPL_NAME="template-test.tpl" | ||
TPL_PATH="${SCRIPT_PATH}/${TPL_NAME}" | ||
FLW_PATH="${SCRIPT_PATH}" | ||
|
||
|
||
### | ||
### Build Matrix | ||
### | ||
PYTHON_VERSIONS=("2.7" "3.6" "3.7" "3.8") | ||
OPERATING_SYSTEMS=("ubuntu" "windows" "macos") | ||
|
||
|
||
for os in ${!OPERATING_SYSTEMS[*]}; do | ||
for v in ${!PYTHON_VERSIONS[*]}; do | ||
out_file="${FLW_PATH}/test-${OPERATING_SYSTEMS[${os}]//ubuntu/linux}-${PYTHON_VERSIONS[${v}]}.yml" | ||
flw_name="${OPERATING_SYSTEMS[${os}]:0:3}-${PYTHON_VERSIONS[${v}]}" | ||
job_name="[${OPERATING_SYSTEMS[${os}]:0:3}] ${PYTHON_VERSIONS[${v}]}" | ||
os_name="${OPERATING_SYSTEMS[${os}]}-latest" | ||
python="${PYTHON_VERSIONS[${v}]}" | ||
|
||
flw_name="${flw_name//ubu/lin}" | ||
job_name="${job_name//ubu/lin}" | ||
|
||
printf "%s\\n" "-----------------------------------------------------------" | ||
printf "file: %s\\n" "${out_file}" | ||
printf "flw name: %s\\n" "${flw_name}" | ||
printf "job name: %s\\n" "${job_name}" | ||
printf "OS: %s\\n" "${os_name}" | ||
printf "Python: %s\\n" "${python}" | ||
|
||
cat "${TPL_PATH}" \ | ||
| sed "s/__WORKFLOW_NAME__/${flw_name}/g" \ | ||
| sed "s/__OS__/${os_name}/g" \ | ||
| sed "s/__PYTHON_VERSION__/${python}/g" \ | ||
| sed "s/__JOB_NAME__/${job_name}/g" \ | ||
> "${out_file}" | ||
done | ||
done |
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,153 @@ | ||
--- | ||
|
||
name: __WORKFLOW_NAME__ | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
|
||
jobs: | ||
test: | ||
runs-on: __OS__ | ||
strategy: | ||
fail-fast: False | ||
matrix: | ||
version: | ||
- __PYTHON_VERSION__ | ||
|
||
name: "__JOB_NAME__" | ||
steps: | ||
# ------------------------------------------------------------ | ||
# Setup | ||
# ------------------------------------------------------------ | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.version }} | ||
|
||
# ------------------------------------------------------------ | ||
# Tests: Behaviour | ||
# ------------------------------------------------------------ | ||
|
||
### | ||
### Shutdown | ||
### | ||
- name: "[BEHAVIOUR] (TCP) Client shutdown" | ||
shell: bash | ||
run: | | ||
make test-behaviour-tcp_client_exits_and_server_hangs_up | ||
|
||
- name: "[BEHAVIOUR] (UDP) Client shutdown" | ||
shell: bash | ||
run: | | ||
make test-behaviour-udp_client_exits_and_server_stays_alive | ||
|
||
- name: "[BEHAVIOUR] (TCP) Server shutdown" | ||
shell: bash | ||
run: | | ||
make test-behaviour-tcp_server_exits_and_hangs_up | ||
|
||
- name: "[BEHAVIOUR] (UDP) Server shutdown" | ||
shell: bash | ||
run: | | ||
make test-behaviour-udp_server_exits_and_client_stays_alive | ||
|
||
### | ||
### Socket | ||
### | ||
- name: "[BEHAVIOUR] (TCP) Socket REUSEADDR" | ||
shell: bash | ||
run: | | ||
make test-behaviour-tcp_socket_reuseaddr | ||
|
||
- name: "[BEHAVIOUR] (UDP) Socket REUSEADDR" | ||
shell: bash | ||
run: | | ||
make test-behaviour-udp_socket_reuseaddr | ||
|
||
# ------------------------------------------------------------ | ||
# Tests: Basic | ||
# ------------------------------------------------------------ | ||
|
||
### | ||
### Client requests | ||
### | ||
- name: "[BASICS] (TCP) Client makes HTTP request" | ||
shell: bash | ||
run: | | ||
make test-basics-client-tcp_make_http_request | ||
|
||
### | ||
### Client sends data/file/command to server | ||
### | ||
- name: "[BASICS] (TCP) Client sends data to Server" | ||
shell: bash | ||
run: | | ||
make test-basics-client-tcp_send_text_to_server | ||
|
||
- name: "[BASICS] (UDP) Client sends data to Server" | ||
shell: bash | ||
run: | | ||
make test-basics-client-udp_send_text_to_server | ||
|
||
- name: "[BASICS] (TCP) Client sends file to Server" | ||
shell: bash | ||
run: | | ||
make test-basics-client-tcp_send_file_to_server | ||
|
||
- name: "[BASICS] (UDP) Client sends file to Server" | ||
shell: bash | ||
run: | | ||
make test-basics-client-udp_send_file_to_server | ||
|
||
- name: "[BASICS] (TCP) Client sends command to Server" | ||
shell: bash | ||
run: | | ||
make test-basics-client-tcp_send_comand_to_server | ||
|
||
- name: "[BASICS] (UDP) Client sends command to Server" | ||
shell: bash | ||
run: | | ||
make test-basics-client-udp_send_comand_to_server | ||
|
||
# ------------------------------------------------------------ | ||
# Tests: Options | ||
# ------------------------------------------------------------ | ||
|
||
### | ||
### DNS Resolution | ||
### | ||
- name: "[OPTIONS] (TCP) Client --nodns" | ||
shell: bash | ||
run: | | ||
make test-options-client-tcp_nodns | ||
|
||
- name: "[OPTIONS] (UDP) Client --nodns" | ||
shell: bash | ||
run: | | ||
make test-options-client-udp_nodns | ||
|
||
### | ||
### Keep open | ||
### | ||
- name: "[OPTIONS] (TCP) Server --keep-open" | ||
shell: bash | ||
run: | | ||
make test-options-tcp_server_keep_open | ||
|
||
# ------------------------------------------------------------ | ||
# Tests: Modes | ||
# ------------------------------------------------------------ | ||
|
||
### | ||
### Port Forward | ||
### | ||
- name: "[MODES] (TCP) Port Forward" | ||
shell: bash | ||
run: | | ||
make test-modes-forwawrd_tcp-client_make_http_request |
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
Oops, something went wrong.