Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
gamecss committed Jul 22, 2023
1 parent 255901c commit 7f5651d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.11"]

steps:
- uses: actions/checkout@v3
Expand All @@ -26,12 +26,17 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Merge debug patch
if: ${{ matrix.python-version == "3.8" }}
run: |
patch -p1 < debug.patch
- uses: pdm-project/setup-pdm@v3
with:
python-version: ${{ matrix.python-version }}
cache: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pdm
pdm export -d > requirements.txt
pip install -r requirements.txt
pdm install -G dev
#- name: Run pyright
# uses: jakebailey/pyright-action@v1
# with:
Expand All @@ -48,7 +53,7 @@ jobs:
run: |
pdm build
- uses: actions/upload-artifact@v3
if: ${{ always() }} # steps.build.outputs.exit_code == 0
if: ${{ steps.build.outputs.exit_code == 0 }}
with:
name: dist
name: ${{ matrix.python-version == "3.8" && "dist_debug" || "dist" }}
path: dist/*
14 changes: 4 additions & 10 deletions debug.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
diff --git a/pyfsd/protocol/client.py b/pyfsd/protocol/client.py
index 86691d3..aeffc48 100644
index d9cdf55..8b8a770 100644
--- a/pyfsd/protocol/client.py
+++ b/pyfsd/protocol/client.py
@@ -1,4 +1,5 @@
from threading import Lock
+from time import time
from typing import TYPE_CHECKING, List, Optional, Tuple

from twisted.internet import reactor
@@ -51,6 +52,21 @@ class FSDClientProtocol(LineReceiver):
@@ -57,6 +57,21 @@ class FSDClientProtocol(LineReceiver):
ip=self.transport.getPeer().host, # type: ignore[attr-defined]
)
self.factory.triggerEvent("newConnectionEstablished", (self,), {})
Expand All @@ -30,7 +24,7 @@ index 86691d3..aeffc48 100644

def sendLines(
self, *lines: bytes, auto_newline: bool = True, togerher: bool = True
@@ -296,7 +312,8 @@ class FSDClientProtocol(LineReceiver):
@@ -302,7 +317,8 @@ class FSDClientProtocol(LineReceiver):
)
self.factory.triggerEvent("newClientCreated", (self,), {})

Expand All @@ -40,7 +34,7 @@ index 86691d3..aeffc48 100644

def handleRemoveClient(self, packet: Tuple[bytes, ...]) -> None:
if len(packet) == 0:
@@ -680,6 +697,16 @@ class FSDClientProtocol(LineReceiver):
@@ -746,6 +762,16 @@ class FSDClientProtocol(LineReceiver):
# Acquire without lock it (nearly)
pass

Expand Down

0 comments on commit 7f5651d

Please sign in to comment.