File: pythonpackage.yml

package info (click to toggle)
fangfrisch 1.9.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 804 kB
  • sloc: python: 1,326; sh: 113; makefile: 64; sql: 24
file content (51 lines) | stat: -rw-r--r-- 1,391 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
# vim: et ts=2 sw=2
---
name: Python build and package

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        # python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
        python-version: ['3.9']

    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: |
          sudo apt-get install sqlite3
          python -m pip install wheel
          python -m pip install -U pip flake8
          python -m pip install -r requirements.txt

      - name: Lint Python code
        run: |
          flake8 src tests --config=.flake8 --select=E9,F63,F7,F82 --show-source
          flake8 src tests --config=.flake8 --exit-zero --max-complexity=10 --max-line-length=127

      - name: Run unit tests
        env:
          NETWORK_TESTS: 0
          PYTHONPATH: '.:src'
        run: |
          mkdir -p /tmp/fangfrisch/unittest
          sqlite3 /tmp/fangfrisch/unittest/db.sqlite < tests/tests.sql
          python -m unittest discover tests/ -v

      - name: Build
        run: python -m build

      - name: Upload artifacts
        uses: actions/upload-artifact@v4
        with:
          name: ffdist-py${{ matrix.python-version }}
          path: dist/*