Skip to content

Commit

Permalink
ci: allow spec typing extra (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Feb 22, 2023
1 parent 62d7532 commit 8e2d91a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/check-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
default: '3.9'
required: false
type: string
extra-typing:
description: 'Package extra to be installed for type checks + include mypy'
default: 'test'
required: false
type: string

defaults:
run:
Expand All @@ -35,7 +40,7 @@ jobs:
- name: Install dependencies
run: |
# don't use --upgrade to respect the version installed via setup.py
pip install -e '.[test]' mypy types-setuptools \
pip install -e '.[${{ inputs.extra-typing }}]' mypy \
--extra-index-url https://download.pytorch.org/whl/cpu/torch_stable.html
pip list
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-use-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
uses: ./.github/workflows/check-code.yml
with:
actions-ref: ${{ github.sha }} # use local version
extra-typing: 'typing'

check-schema:
uses: ./.github/workflows/check-schema.yml
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

-
- CI: allow specify typing extra ([#110](https://github.com/Lightning-AI/utilities/pull/110))


### Fixed
Expand Down
3 changes: 3 additions & 0 deletions requirements/typing.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mypy>=1.0.0

types-setuptools

0 comments on commit 8e2d91a

Please sign in to comment.