[pre-commit.ci] pre-commit autoupdate #787
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
- uses: actions/setup-python@v5 | |
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@v4 | |
- uses: actions/setup-python@v5 | |
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.8", "3.9", "3.10", "3.11", "3.12", "3.13", "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@v4 | |
- uses: actions/setup-python@v5 | |
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 -e py |