Fix trailing newline #2323
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
on: | |
push: | |
branches: | |
- main | |
- bugfix-release | |
pull_request: | |
jobs: | |
mypy: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# Mypy running on platform A can check for platform B, so it all runs on linux. | |
# Multiple parallel jobs are needed only to make this faster. | |
mypy-platform: ["linux", "win32", "darwin"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
cache: pip | |
- run: pip install wheel | |
- run: pip install -r requirements-dev.txt | |
- run: | | |
time mypy --platform ${{ matrix.mypy-platform }} --python-version 3.9 porcupine | |
time mypy --platform ${{ matrix.mypy-platform }} --python-version 3.10 porcupine | |
time mypy --platform ${{ matrix.mypy-platform }} --python-version 3.11 porcupine | |
pytest-windows: | |
timeout-minutes: 10 | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
- run: pip install wheel | |
- run: pip install -r requirements-dev.txt | |
- name: Download tkdnd | |
run: | | |
python scripts/download-tkdnd.py | |
echo "TCLLIBPATH=lib" >> $env:GITHUB_ENV | |
- run: python -m pytest --durations=10 | |
pytest-linux: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
- run: pip install wheel | |
- run: pip install -r requirements-dev.txt | |
# Make sure that it doesn't crash with Noto Color Emoji installed | |
- run: sudo apt install --no-install-recommends fonts-noto-color-emoji tkdnd xvfb | |
- run: xvfb-run python -m pytest --durations=10 | |
# Separate from other pytests because tkinter doesn't work on macos with actions/setup-python. | |
# It imports, but gives this error: RuntimeError: tk.h version (8.6) doesn't match libtk.a version (8.5) | |
pytest-macos: | |
timeout-minutes: 15 | |
# TODO: run tests on M1 macos when we no longer need tree-sitter-builds. | |
# This was never supported by tree-sitter-builds: https://github.com/Akuli/py-tree-sitter-builds/issues/11 | |
runs-on: macos-13 # latest intel mac | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11"] | |
env: | |
# TODO: how to install tkdnd on mac? add instructions to README or make mac app that bundles it | |
TCLLIBPATH: ./lib | |
PYTHON: /usr/local/opt/python@${{ matrix.python-version }}/libexec/bin/python | |
steps: | |
- uses: actions/checkout@v4 | |
- run: brew install python@${{ matrix.python-version }} | |
- run: brew install python-tk@${{ matrix.python-version }} | |
- run: $PYTHON --version | |
- run: $PYTHON -m pip install -r requirements-dev.txt | |
- run: $PYTHON scripts/download-tkdnd.py | |
- run: $PYTHON -m pytest --durations=10 | |
flake8-tkinter: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
cache: pip | |
# TODO: adding these to requirements-dev.txt breaks pip install | |
- run: pip install flake8=='7.*' flake8_tkinter==0.6.0 | |
- run: python3 -m flake8 --select=TK $(git ls-files | grep -E '\.(py|pyw)$') | |
markdown-links: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
cache: pip | |
- run: pip install requests | |
- run: python3 scripts/check-markdown-links.py |