Skip to content

Add type hints, update tox config #537

Add type hints, update tox config

Add type hints, update tox config #537

Workflow file for this run

name: Build
on:
push:
branches-ignore:
# These should always correspond to pull requests, so ignore them for
# the push trigger and let them be triggered by the pull_request
# trigger, avoiding running the workflow twice. This is a minor
# optimization so there's no need to ensure this is comprehensive.
- 'dependabot/**'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
# The branches below must be a subset of the branches above
pull_request:
branches:
- develop
- main
jobs:
build:
name: Build and test package distribution
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Set up Python 3.10
uses: actions/[email protected]
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Check MANIFEST.in for completeness
run: tox -e manifest
- name: Build and test package
run: tox -e build
- name: Archive build artifacts
if: success()
uses: actions/upload-artifact@v3
with:
# To ensure that jobs don't overwrite existing artifacts,
# use a different name per job.
name: build-${{ matrix.os }}
path: .tox/build/tmp/build
# Artifacts are retained for 90 days by default.
# In fact, we don't need such long period.
retention-days: 60
install-dev:
name: Verify dev environment
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Set up Python 3.10
uses: actions/[email protected]
with:
python-version: '3.10'
- name: Install in dev mode
run: python -m pip install -e .
- name: Import package
run: python -c 'import environ; print(environ.__version__)'