From ad5d60c305857a8e8c06ba4f6db788bf918bb63f Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Tue, 7 Dec 2021 21:43:17 -0800 Subject: [PATCH] chore: add running unit tests on windows/macos Add running the unit tests on windows-latest and macos-latest with Python 3.10. --- .github/workflows/test.yml | 34 +++++++++++++++++++++------------- tests/unit/test_config.py | 2 ++ 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 30a985500..62c2221c0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,31 +14,39 @@ env: jobs: unit: - runs-on: ubuntu-20.04 + runs-on: ${{ matrix.os }} strategy: matrix: - include: - - python-version: 3.7 + os: [ubuntu-latest] + python: + - version: "3.7" toxenv: py37 - - python-version: 3.8 + - version: "3.8" toxenv: py38 - - python-version: 3.9 + - version: "3.9" toxenv: py39 - - python-version: "3.10" - toxenv: py310 - - python-version: "3.10" - toxenv: smoke + - version: "3.10" + toxenv: py310,smoke + include: + - os: macos-latest + python: + version: "3.10" + toxenv: py310,smoke + - os: windows-latest + python: + version: "3.10" + toxenv: py310,smoke steps: - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} + - name: Set up Python ${{ matrix.python.version }} uses: actions/setup-python@v2 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ matrix.python.version }} - name: Install dependencies - run: pip install tox pytest-github-actions-annotate-failures + run: pip3 install tox pytest-github-actions-annotate-failures - name: Run tests env: - TOXENV: ${{ matrix.toxenv }} + TOXENV: ${{ matrix.python.toxenv }} run: tox functional: diff --git a/tests/unit/test_config.py b/tests/unit/test_config.py index 2bc2d256c..ffd67c430 100644 --- a/tests/unit/test_config.py +++ b/tests/unit/test_config.py @@ -17,6 +17,7 @@ import io import os +import sys from textwrap import dedent from unittest import mock @@ -214,6 +215,7 @@ def test_valid_data(m_open, path_exists): @mock.patch("os.path.exists") @mock.patch("builtins.open") +@pytest.mark.skipif(sys.platform.startswith("win"), reason="Not supported on Windows") def test_data_from_helper(m_open, path_exists, tmp_path): helper = tmp_path / "helper.sh" helper.write_text( pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy