sanity #231
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
# Run workflow weekly to make sure interrogate can regularly build in case | |
# there are new releases of dependencies. This is the same as main workflow, | |
# but (1) coverage isn't uploaded, and (2) `install-dev` job runs only on | |
# ubuntu, not all three OS platforms. | |
name: sanity | |
# trigger weekly on Monday at 5am UTC (no particular reason why this date/time) | |
on: | |
schedule: | |
- cron: "0 5 * * 1" | |
env: | |
FORCE_COLOR: "1" | |
TOX_TESTENV_PASSENV: FORCE_COLOR | |
PYTHON_LATEST: "3.10" | |
jobs: | |
tests: | |
name: "Python ${{ matrix.python-version }} on Ubuntu" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: "actions/checkout@v3" | |
- uses: "actions/setup-python@v4" | |
with: | |
python-version: "${{ matrix.python-version }}" | |
allow-prereleases: true | |
cache: pip | |
- name: "Install dependencies" | |
run: | | |
set -xe | |
python -VV | |
python -m site | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install --upgrade virtualenv tox tox-gh-actions | |
- name: "Run tox targets for ${{ matrix.python-version }}" | |
run: "python -m tox" | |
package: | |
name: "Build & Verify Package on Ubuntu" | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: "actions/checkout@v3" | |
- uses: "actions/setup-python@v4" | |
with: | |
python-version: ${{env.PYTHON_LATEST}} | |
- run: python -m pip install build twine check-wheel-contents | |
- run: python -m build --sdist --wheel . | |
- run: ls -l dist | |
- run: check-wheel-contents dist/*.whl | |
- name: Check long_description | |
run: python -m twine check dist/* | |
install-dev: | |
name: "Verify Dev Env on Ubuntu" | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: "actions/checkout@v3" | |
- uses: "actions/setup-python@v4" | |
with: | |
python-version: ${{env.PYTHON_LATEST}} | |
- name: "Install in dev mode" | |
run: "python -m pip install -e .[dev]" | |
- name: "Import package" | |
run: "python -c 'import interrogate; print(interrogate.__version__)'" |