From b0cd75c854e3b6cd2bfad005d538862f3ebf64fb Mon Sep 17 00:00:00 2001 From: Maximo Mussini Date: Tue, 29 Sep 2026 14:58:28 -0300 Subject: [PATCH 1/2] ci: run plugin tests on pull requests Test Python 3.8 and 3.14 on changes targeting master. Handle HTTPError status on Python 3.8 so both CI jobs can pass. --- .github/workflows/tests.yml | 24 ++++++++++++++++++++++++ sublime_requests.py | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..3a96925 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,24 @@ +name: Tests + +on: + push: + branches: [master] + pull_request: + branches: [master] + +permissions: + contents: read + +jobs: + tests: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.8', '3.14'] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + - name: Run tests + run: python -m unittest discover -s tests -v diff --git a/sublime_requests.py b/sublime_requests.py index ab357d0..93cf085 100644 --- a/sublime_requests.py +++ b/sublime_requests.py @@ -20,7 +20,7 @@ class codes: class Response: def __init__(self, response): - self.status_code = response.status + self.status_code = getattr(response, "status", None) or response.code self.headers = response.headers self.url = response.url self.text = response.read().decode("utf-8") From 162e74d3f2e7dc57322f3992a44c436f2eff0fc9 Mon Sep 17 00:00:00 2001 From: Maximo Mussini Date: Tue, 29 Sep 2026 14:59:30 -0300 Subject: [PATCH 2/2] ci: use checkout v6 to avoid deprecated Node runtime --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3a96925..310305a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,7 @@ jobs: matrix: python-version: ['3.8', '3.14'] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }}