-
-
Notifications
You must be signed in to change notification settings - Fork 38
40 lines (37 loc) · 1020 Bytes
/
code_checker.yml
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
name: Code checker
on:
push:
pull_request:
schedule:
- cron: "0 4 * * *"
jobs:
validate:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version:
- "3.11"
- "3.12"
env:
SRC_FOLDER: tibber
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependency
run: |
pip install -r requirements.txt
pip install mypy pre-commit pytest pytest-asyncio pytest-cov ruff
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure --color=always
shell: bash
- name: pytest
run: |
pytest