Skip to content

Commit

Permalink
workflows: add Python 3.11 to build/test run (bug 1825275) (#1384)
Browse files Browse the repository at this point in the history
- add new build-and-test-windows-cli job (bug 1844111)
- skip test that fails on windows (bug 1844111)
- add Python 3.11 to test matrix (bug 1843853)
  • Loading branch information
zzzeid committed Jul 18, 2023
1 parent 37ce40b commit affc21f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
os:
- ubuntu-20.04
- ubuntu-22.04
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- name: setup
Expand All @@ -59,6 +59,25 @@ jobs:
coverage run -m pytest tests
coveralls --service=github
build-and-test-windows-cli:
runs-on: windows-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Install dependencies and run tests
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements/requirements-3.11-Windows.txt
python -m pip install -e .
python -m pytest tests
build-and-test-linux-gui:
runs-on: ${{ matrix.os }}
strategy:
Expand Down
9 changes: 9 additions & 0 deletions tests/unit/test_launchers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import absolute_import

import os
import sys
import tempfile
import unittest
from subprocess import CalledProcessError
Expand Down Expand Up @@ -243,6 +244,10 @@ def test__codesign_sign(self, mozinstall, mozinfo, call):
call.assert_called_with(["codesign", "--force", "--deep", "--sign", "-", "/"])
call.assert_called_once()

@pytest.mark.skipif(
sys.platform == "win32",
reason="os.path.normpath behaviour on Windows interferes with this test",
)
@patch("mozregression.launchers.mozinfo")
@patch("mozregression.launchers.mozinstall")
def test__codesign_assert_resigned_if_unsigned(self, mozinstall, mozinfo):
Expand All @@ -268,6 +273,10 @@ def test__codesign_assert_no_calls_if_not_on_mac(self, mozinstall, mozinfo):
_codesign_sign.assert_not_called()
_codesign_verify.assert_not_called()

@pytest.mark.skipif(
sys.platform == "win32",
reason="os.path.normpath behaviour on Windows interferes with this test",
)
@patch("mozregression.launchers.mozinfo")
@patch("mozregression.launchers.mozinstall")
def test__codesign_assert_not_resigned_if_not_unsigned(self, mozinstall, mozinfo):
Expand Down

0 comments on commit affc21f

Please sign in to comment.