Debian Codegraph @

.github/workflows/python-package.yml

raw
1 # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2 # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
4 name: Python package
5
6 on:
7 push:
8 branches: [ master ]
9 pull_request:
10 branches: [ master ]
11
12 permissions:
13 contents: read
14
15 jobs:
16 build:
17
18 runs-on: ubuntu-latest
19 strategy:
20 fail-fast: false
21 matrix:
22 python-version: [3.8, 3.9, "3.10"]
23
24 steps:
25 - uses: actions/[email protected]
26 - name: Set up Python ${{ matrix.python-version }}
27 uses: actions/[email protected]
28 with:
29 python-version: ${{ matrix.python-version }}
30
31 - name: Install dependencies
32 run: |
33 python -m pip install --upgrade pip
34 pip install \
35 pytest \
36 tox
37 cp tests/config-ci.py config.py
38
39 - name: Test on ${{ matrix.python-version }}
40 run: |
41 tox -e py
42
43 - name: Check Distribution
44 if: ${{ matrix.python-version == '3.9' }}
45 run: |
46 tox -e dist-check
47
48 - name: Codestyle
49 if: ${{ matrix.python-version == '3.9' }}
50 run: |
51 tox -e codestyle
52
53 - name: Lint - sort
54 if: ${{ matrix.python-version == '3.9' }}
55 run: |
56 tox -e sort
57
58 - name: Security
59 if: ${{ matrix.python-version == '3.9' }}
60 run: |
61 tox -e security
62
63 - name: Docs
64 if: ${{ matrix.python-version == '3.9' }}
65 run: |
66 tox -e docs