File: code_checker.yml

package info (click to toggle)
pytibber 0.34.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 272 kB
  • sloc: python: 1,722; makefile: 4
file content (73 lines) | stat: -rw-r--r-- 2,009 bytes parent folder | download
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Code checker

on:
  push:
  pull_request:
  schedule:
    - cron: "0 4 * * *"

jobs:
  validate:
    runs-on: "ubuntu-latest"
    strategy:
      matrix:
        python-version:
          - "3.12"
          - "3.13"
    env:
      SRC_FOLDER: tibber
    steps:
      - uses: actions/checkout@v6
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v6
        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

  validate-gql-350:
    runs-on: "ubuntu-latest"
    strategy:
      matrix:
        python-version:
          - "3.12"
          - "3.13"
    env:
      SRC_FOLDER: tibber
    steps:
      - uses: actions/checkout@v6
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v6
        with:
          python-version: ${{ matrix.python-version }}
          cache: 'pip'

      - name: Install dependency with gql==3.5.0
        run: |
            pip install -r requirements.txt
            pip install gql==3.5.0
            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