lightning/.github/workflows/code-checks.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.2 KiB
YAML
Raw Normal View History

2022-02-02 19:48:15 +00:00
name: Code check
2021-07-12 18:28:35 +00:00
on:
2021-07-12 18:28:35 +00:00
push:
branches: [master, "release/*"]
pull_request:
branches: [master, "release/*"]
paths:
2023-06-15 15:25:59 +00:00
- ".actions/*"
- ".github/workflows/code-checks.yml"
- "requirements/**"
- "src/**"
- "pyproject.toml" # includes mypy config
2022-11-26 01:16:48 +00:00
- "!requirements/docs.txt"
- "!requirements/*/docs.txt"
2022-11-16 10:07:02 +00:00
- "!*.md"
- "!**/*.md"
2021-07-12 18:28:35 +00:00
2022-02-02 19:48:15 +00:00
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
2023-12-21 22:49:18 +00:00
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
2022-02-02 19:48:15 +00:00
2022-11-01 00:44:58 +00:00
defaults:
run:
shell: bash
2021-07-12 18:28:35 +00:00
jobs:
mypy:
2021-07-12 18:28:35 +00:00
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Mypy cache
uses: actions/cache@v4
with:
path: .mypy_cache
key: mypy-${{ hashFiles('requirements/typing.txt') }}
- name: Install dependencies
env:
FREEZE_REQUIREMENTS: 1
timeout-minutes: 20
run: |
pip install -e '.[pytorch-all,fabric-all]' -r requirements/typing.txt
pip list
- name: Check typing
run: mypy