forked from python-telegram-bot/python-telegram-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (47 loc) · 1.14 KB
/
mypy.yml
File metadata and controls
47 lines (47 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: mypy
on:
pull_request:
branches:
- master
- type_hinting_master
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies and mypy
run: |
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install mypy==0.761
- name: Verify mypy types
run: |
mypy --version
- name: saving changed files in local json
uses: lots0logs/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Running mypy on changed files
run: |
sudo apt install jq
echo $HOME
echo $HOME/files.json
for FILENAME in $(jq '.[]' $HOME/files.json); do
FILENAME="${FILENAME:1}"
FILENAME="${FILENAME::-1}"
if [ ${FILENAME: -3} == ".py" ]
then
echo Testing $FILENAME
python -m mypy $FILENAME
else
echo Skipping $FILENAME
fi
done
shell: bash