name: build on: push: pull_request: # build weekly at 4:00 AM UTC schedule: - cron: '0 4 * * 1' jobs: # this job ensures that tests can run from the packaged version, which means # that nose2 is correctly packaging and distributing its tests test-sdist: name: run tests from packaged source runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: python-version: "3.12" - name: install build prereqs run: pip install build - name: test run: | python -m build --sdist version="$(cat nose2/__init__.py | grep '^__version__' | cut -d '"' -f2)" cd dist tar -xzf "nose2-${version}.tar.gz" cd "nose2-${version}" pip install -e '.[dev]' nose2 -v --pretty-assert typing: name: 'typing (mypy)' runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: python-version: "3.12" - run: pip install tox - run: tox run -e mypy test: strategy: fail-fast: false matrix: # for the matrix, linux on all pythons # # any additional builds for windows and macos # handled via `include` to avoid an over-large test matrix os: [ubuntu-latest] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "pypy-3.9"] include: - os: windows-latest python-version: "3.x" - os: macos-latest python-version: "3.x" name: "python=${{ matrix.python-version }} os=${{ matrix.os }}" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} allow-prereleases: true - name: install tox run: python -m pip install -U tox - name: test run: | python -m tox run -m ci test-mp: name: "multiprocessing test run" runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: python-version: '3.14' - name: install tox run: python -m pip install -U tox - name: test run: | python -m tox run -e py314-mp