diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2bf8b4f..8a0b252 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,16 +11,16 @@ jobs: if: github.repository == 'pytest-dev/pytest-selenium' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 persist-credentials: false - name: Build and Check Package - uses: hynek/build-and-inspect-python-package@v1 + uses: hynek/build-and-inspect-python-package@v2 - name: Download Package - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: Packages path: dist diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ef4cc7b..de16ba0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,8 +5,8 @@ on: branches: - master -# schedule: -# - cron: '0 18 * * *' # Run daily at 14:00 UTC + schedule: + - cron: '0 18 * * *' # Run daily at 18:00 UTC pull_request: @@ -19,12 +19,12 @@ jobs: if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository == 'pytest-dev/pytest-selenium') runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: "3.12" - name: Install dependencies run: | @@ -35,28 +35,20 @@ jobs: run: tox -e linting test: - name: ubuntu-latest - ${{ matrix.tox-env || matrix.python-version }} + name: ubuntu-latest - ${{ matrix.tox-env }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] - include: - - os: ubuntu-latest - python-version: pypy3.9 - tox-env: py3.9 - - - os: ubuntu-latest - python-version: 3.12 - tox-env: devel + tox-env: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.10", "devel"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ matrix.tox-env == 'devel' && 3.12 || matrix.tox-env }} # default is for devel - name: Install tox run: | @@ -67,43 +59,46 @@ jobs: run: docker/start - name: Cache tox environments - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: .tox - key: tox-ubuntu-latest-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'tox.ini') }} + key: ubuntu-latest-tox-${{ matrix.tox-env }}-${{ hashFiles('pyproject.toml', 'tox.ini') }} restore-keys: | - tox-ubuntu-latest-${{ matrix.python-version }}- - - - name: Set tox variable - shell: bash - run: | - echo "python-version: ${{ matrix.python-version }}" - echo "tox-env: ${{ matrix.tox-env }}" - if [[ -n "${{ matrix.tox-env }}" ]]; then - echo "tox=${{ matrix.tox-env }}" >> "$GITHUB_ENV" - else - echo "tox=py${{ matrix.python-version }}" >> "$GITHUB_ENV" - fi + ubuntu-latest-tox-${{ matrix.tox-env }}- + +# - name: Set tox variable +# shell: bash +# run: | +# echo "python-version: ${{ matrix.python-version }}" +# echo "tox-env: ${{ matrix.tox-env }}" +# if [[ -n "${{ matrix.tox-env }}" ]]; then +# echo "tox=${{ matrix.tox-env }}" >> "$GITHUB_ENV" +# else +# echo "tox=py${{ matrix.python-version }}" >> "$GITHUB_ENV" +# fi +# +# - name: Test +# run: tox -e "${{ env.tox }}" - name: Test - run: tox -e "${{ env.tox }}" + run: tox -e ${{ matrix.tox-env }} - name: Archive report.html if: failure() - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: - name: report.html.${{ matrix.os }}-${{ env.tox }}.zip - path: .tox/${{ env.tox }}/log/report.html + name: report.html-${{ matrix.tox-env }}.zip + path: .tox/${{ matrix.tox-env }}/log/report.html docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.12" - name: Install dependencies run: | diff --git a/docs/news.rst b/docs/news.rst index 063c160..bb98449 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -1,7 +1,14 @@ Release Notes ============= -4.0.2 (2023-09-13) +4.1.0 (2024-02-01) +------------------ + +* Support pytest 8.0 + + * Thanks to `@sandre35 `_ for reporting the issue and the PR. + +4.0.2 (2023-11-20) ------------------ * Support selenium 4.10-4.15 diff --git a/pyproject.toml b/pyproject.toml index 99a87e2..4019520 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ name = "pytest-selenium" description = "pytest plugin for Selenium" readme = "README.rst" license = "MPL-2.0" -requires-python = ">=3.7" +requires-python = ">=3.8" keywords = [ "pytest", "selenium", @@ -32,11 +32,11 @@ classifiers = [ "Operating System :: POSIX", "Operating System :: Microsoft :: Windows", "Operating System :: MacOS :: MacOS X", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Quality Assurance", diff --git a/src/pytest_selenium/pytest_selenium.py b/src/pytest_selenium/pytest_selenium.py index e83e5c1..2af0c9a 100644 --- a/src/pytest_selenium/pytest_selenium.py +++ b/src/pytest_selenium/pytest_selenium.py @@ -400,7 +400,7 @@ def pytest_addoption(parser): parser.addini( "selenium_exclude_debug", help="debug to exclude from capture", - default=os.getenv("SELENIUM_EXCLUDE_DEBUG"), + default=os.getenv("SELENIUM_EXCLUDE_DEBUG", ""), ) _auth_choices = ("none", "token", "hour", "day") diff --git a/tox.ini b/tox.ini index 8252bb1..02362f7 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = py{3.7, 3.8, 3.9, 3.10, 3.11, py3.9}, docs, linting +envlist = py{3.8, 3.9, 3.10, 3.11, 3.12, py3.10}, docs, linting isolated_build = True [testenv]