test: Add tests for _disconnect future handling in __aexit__ #286
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
name: Run tests | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
include: | |
- os: macos-latest | |
python-version: "3.8" | |
- os: macos-latest | |
python-version: "3.11" | |
- os: windows-latest | |
python-version: "3.8" | |
- os: windows-latest | |
python-version: "3.11" | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Install dependencies | |
run: rm poetry.lock && scripts/setup # Ignore poetry.lock | |
- name: Run checks | |
run: scripts/check --dry | |
- name: Test with pytest | |
run: scripts/test | |
- name: Upload coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
name: ${{ matrix.os }} Python ${{ matrix.python-version }} | |
files: ./reports/coverage.xml | |
- name: Publish JUnit reports | |
uses: mikepenz/action-junit-report@v3 | |
if: always() # Always run, even if the previous steps fail | |
with: | |
check_name: Junit reports | |
report_paths: "./reports/*.xml" |