move exclude to field #224
Workflow file for this run
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: Tests | |
on: [push] | |
concurrency: | |
group: tests-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Poetry | |
shell: bash | |
run: curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.4.2 python3 - | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'poetry' | |
- name: Install dependencies | |
run: poetry install | |
# Run ipykernel "stand-alone" and set approriate env variables for tests to use this process | |
# instead of having the tests start an ipykernel using a fixture. In my experience, this | |
# reduces some race conditions that lead to flaky tests but doesn't totally remove them. | |
- name: Start Ipykernel | |
run: poetry run python -m ipykernel_launcher --debug -f /tmp/kernel.json & echo "KERNEL_PID=$!" >> $GITHUB_ENV | |
- name: Run tests | |
env: | |
IPYKERNEL_TEST_CONNECTION_FILE: /tmp/kernel.json | |
PYTHONASYNCIODEBUG: "1" | |
run: poetry run pytest --reruns 5 --reruns-delay 1 -s -v | |
- name: Stop Ipykernel | |
if: always() | |
run: kill "${{ env.KERNEL_PID }}" |