Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflow: Tox and workflow definition improvements #614

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 10 additions & 15 deletions .github/workflows/lsp-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v3
Expand All @@ -24,6 +24,12 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: tox cache
uses: actions/cache@v3
with:
path: ./lib/esboino/.tox
key: ${{ runner.os }}-lsp-pr-tox-envs-${{ matrix.python-version }}

- run: |
python --version
python -m pip install --upgrade pip
Expand All @@ -43,20 +49,9 @@ jobs:
cd lib/esbonio

version=$(echo ${{ matrix.python-version }} | tr -d .)
python -m tox -e `tox -l | grep $version | tr '\n' ','`
name: Run Tests (when not on Windows)
if: matrix.os != 'windows-latest'

- run: |
cd lib/esbonio

$version=$(echo "${{ matrix.python-version }}" | tr -d ".")
$envs=$(tox -l | grep $version)

echo $($envs -join ",")
python -m tox -e $($envs -join ",")
name: Run Tests (when on Windows)
if: matrix.os == 'windows-latest'
python -m tox run-parallel --parallel-no-spinner -e `tox -l | grep $version | tr '\n' ','`
shell: bash
name: Run Tests

- name: Package
run: |
Expand Down
4 changes: 3 additions & 1 deletion lib/esbonio/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ skip_missing_interpreters = true
envlist = py37-sphinx{4,5}, py{38,39,310,311}-sphinx{4,5,6}

[testenv]
package = wheel
wheel_build_env = .pkg
deps =
sphinx4: sphinx>=4,<5

Expand All @@ -89,7 +91,7 @@ commands =
[testenv:pkg]
deps =
build
usedevelop = True
skip_install = True
commands =
python -m build
"""
2 changes: 1 addition & 1 deletion lib/esbonio/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ console_scripts =
[options.extras_require]
test =
mock; python_version<"3.8"
pytest
pytest>=7
pytest-lsp>=0.3
pytest-cov
pytest-timeout
Expand Down
Loading