Debian Codegraph @

.github/workflows/ci.yml

raw
1 name: CI
2
3 on:
4 - push
5 - pull_request
6
7 env:
8 DEFAULT_PYTHON: "3.11"
9
10 jobs:
11 black:
12 name: Check Black
13 runs-on: ubuntu-latest
14 steps:
15 - name: Check out code from GitHub
16 uses: actions/checkout@v4
17
18 - name: Set up Python ${{ env.DEFAULT_PYTHON }}
19 uses: actions/setup-python@v5
20 with:
21 python-version: ${{ env.DEFAULT_PYTHON }}
22
23 - name: Upgrade pip
24 run: |
25 python -m pip install --upgrade pip
26 pip --version
27
28 - name: Install Black
29 run: |
30 pip install black
31
32 - name: Run Black
33 run: |
34 black --check --diff aemet_opendata
35
36 - name: Run Black on examples
37 run: |
38 black --check --diff examples
39
40 pylint:
41 name: Check Pylint (Python ${{ matrix.python-version }})
42 runs-on: ubuntu-latest
43 strategy:
44 matrix:
45 python-version: ["3.11", "3.12"]
46 steps:
47 - name: Check out code from GitHub
48 uses: actions/checkout@v4
49
50 - name: Set up Python ${{ matrix.python-version }}
51 uses: actions/setup-python@v5
52 with:
53 python-version: ${{ matrix.python-version }}
54
55 - name: Upgrade pip
56 run: |
57 python -m pip install --upgrade pip
58 pip --version
59
60 - name: Install Requirements
61 run: |
62 pip install -r requirements.txt
63
64 - name: Install Pylint
65 run: |
66 pip install pylint
67
68 - name: Run Pylint
69 run: |
70 pylint aemet_opendata
71
72 - name: Install aemet_opendata
73 run: |
74 pip install --upgrade .
75
76 - name: Run Pylint on examples
77 run: |
78 pylint examples
79
80 mypy:
81 name: Check Mypy (Python ${{ matrix.python-version }})
82 runs-on: ubuntu-latest
83 strategy:
84 matrix:
85 python-version: ["3.11", "3.12"]
86 steps:
87 - name: Check out code from GitHub
88 uses: actions/checkout@v4
89
90 - name: Set up Python ${{ matrix.python-version }}
91 uses: actions/setup-python@v5
92 with:
93 python-version: ${{ matrix.python-version }}
94
95 - name: Upgrade pip
96 run: |
97 python -m pip install --upgrade pip
98 pip --version
99
100 - name: Install Requirements
101 run: |
102 pip install -r requirements.txt
103
104 - name: Install Mypy
105 run: |
106 pip install mypy
107
108 - name: Run Mypy
109 run: |
110 mypy --strict aemet_opendata
111
112 - name: Install aemet_opendata
113 run: |
114 pip install --upgrade .
115
116 - name: Run Mypy on examples
117 run: |
118 mypy --check-untyped-defs examples
119
120 ruff:
121 name: Check ruff
122 runs-on: ubuntu-latest
123 steps:
124 - name: Check out code from GitHub
125 uses: actions/checkout@v4
126
127 - name: Set up Python ${{ env.DEFAULT_PYTHON }}
128 uses: actions/setup-python@v5
129 with:
130 python-version: ${{ env.DEFAULT_PYTHON }}
131
132 - name: Upgrade pip
133 run: |
134 python -m pip install --upgrade pip
135 pip --version
136
137 - name: Install ruff
138 run: |
139 pip install ruff
140
141 - name: Run ruff
142 run: |
143 ruff check aemet_opendata
144
145 - name: Run ruff on examples
146 run: |
147 ruff check examples