Limnoria/.github/workflows/test.yml
Val Lorentz 2902a85dbd
Fix STS parsing and handling of unchecked-TLS connections (#1524)
* ircutils: Fix incorrect log message on invalid STS policy

* STS: fix confusion over what a secure connection is

irclib computed 'secure_connection' when TLS is enabled and TLS certs
are checked; but ircutils used the value to parse STS policies, which
should only care about being TLS or not.

This commit fixes the incorrect parsing on unchecked-TLS, and triggers
a reconnect when a STS policy is encountered in this case, to force
TLS certs to be checked before storing the policy.

* Accept STS policies when reconnecting after getting it over cleartext

ircutils.parseStsPolicy() was passed self.driver.ssl which is the configured
value, even though the connection was forced to be TLS temporarily

* ci: Lower timeout

* Fix typo in test name

Co-authored-by: James Lu <james@overdrivenetworks.com>

---------

Co-authored-by: James Lu <james@overdrivenetworks.com>
2023-06-10 08:28:08 +02:00

93 lines
2.5 KiB
YAML

name: Test
on:
push:
pull_request:
# Sources of supported versions:
# * https://github.com/actions/python-versions/blob/main/versions-manifest.json
# * https://downloads.python.org/pypy/versions.json
jobs:
build:
runs-on: ${{ matrix.runs-on }}
timeout-minutes: 10
strategy:
matrix:
include:
- python-version: "3.12.0-alpha.7"
with-opt-deps: true
runs-on: ubuntu-22.04
- python-version: "3.11"
with-opt-deps: true
runs-on: ubuntu-22.04
- python-version: "3.10"
with-opt-deps: true
runs-on: ubuntu-22.04
- python-version: "3.10"
with-opt-deps: false
runs-on: ubuntu-22.04
- python-version: "3.9"
with-opt-deps: true
runs-on: ubuntu-22.04
- python-version: "pypy-3.9"
with-opt-deps: true
runs-on: ubuntu-22.04
- python-version: "3.8"
with-opt-deps: true
runs-on: ubuntu-22.04
- python-version: "3.7"
with-opt-deps: true
runs-on: ubuntu-22.04
- python-version: "3.7"
with-opt-deps: false
runs-on: ubuntu-22.04
- python-version: "pypy-3.7"
with-opt-deps: false
runs-on: ubuntu-22.04
- python-version: "3.6"
with-opt-deps: false
runs-on: ubuntu-20.04
- python-version: "pypy-3.6"
with-opt-deps: false
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: |
python3 -m pip install --upgrade pip
- name: Install optional dependencies
if: ${{ matrix.with-opt-deps }}
run: |
python3 -m pip install --upgrade pip
pip3 install -r requirements.txt
- name: Install
run: |
LIMNORIA_WARN_OLD_PYTHON=0 python3 setup.py install
- name: Test with unittest
run: |
supybot-test test -v --plugins-dir=./plugins/ --no-network
- name: Test with irctest
if: "${{ matrix.with-opt-deps && matrix.python-version != 'pypy-3.7' && matrix.python-version != 'pypy-3.9' }}"
run: |
git clone https://github.com/ProgVal/irctest.git
cd irctest
pip3 install -r requirements.txt
make limnoria PYTEST_ARGS=-vs