File: python-qa.yml

package info (click to toggle)
edlio 0.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,144 kB
  • sloc: python: 1,614; sh: 20; makefile: 13
file content (84 lines) | stat: -rw-r--r-- 2,051 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
74
75
76
77
78
79
80
81
82
83
84
name: Python QA

on: [push, pull_request]

jobs:
  build-test:
    name: Build & Test
    runs-on: ubuntu-20.04
    strategy:
      matrix:
        python-version: ['3.10',
                         '3.11',
                         '3.12']

    steps:
    - uses: actions/checkout@v4
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip setuptools wheel pytest flit
        python -m pip install -r requirements.all.txt
        python -m pip install -r docs/requirements.txt
        
    - name: Build (Flit)
      run: |
        python -m flit build
        rm -r dist/

    - name: Test
      run: |
        python -m pytest

    - name: Build & Install
      run: |
        python ./setup.py build
        python ./setup.py install --root=/tmp


  lint:
    name: Linting
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-python@v5
      with:
        python-version: '3.x'
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip setuptools wheel 'flake8>=4.0' 'pylint>=2.12' black
        python -m pip install -r requirements.all.txt

    - name: Lint (flake8)
      run: |
        python -m flake8 ./edlio ./tests --show-source --statistics

    - name: Lint (pylint)
      run: |
        python -m pylint -f colorized ./edlio ./tests
        python -m pylint -f colorized setup.py

    - name: Lint (black)
      run: |
        python -m black --diff .


  mypy:
    name: MyPy Typecheck
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-python@v5
      with:
        python-version: '3.x'
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip setuptools wheel mypy
        python -m pip install -r requirements.all.txt

    - name: Check with MyPy
      run: |
        mypy --pretty edlio