|
10 | 10 |
|
11 | 11 | jobs:
|
12 | 12 | build:
|
| 13 | + name: Build and test on Python ${{ matrix.python-version }} |
13 | 14 | runs-on: ubuntu-latest
|
14 | 15 | strategy:
|
15 | 16 | matrix:
|
16 |
| - python-version: [3.6, 3.7, 3.8, 3.9, 3.10.1] |
| 17 | + python-version: ['3.6', '3.7', '3.8', '3.9', '3.10'] |
17 | 18 | steps:
|
18 |
| - - uses: actions/checkout@v2 |
| 19 | + - name: Checkout project |
| 20 | + uses: actions/checkout@v2 |
| 21 | + with: |
| 22 | + fetch-depth: 0 |
| 23 | + - name: Set up Python ${{ matrix.python-version }} |
| 24 | + uses: actions/setup-python@v2 |
| 25 | + with: |
| 26 | + python-version: ${{ matrix.python-version }} |
| 27 | + - name: Install dependencies |
| 28 | + run: | |
| 29 | + pip install -r requirements/dev.txt |
| 30 | + pip install -r requirements/test.txt |
| 31 | + - name: Linting |
| 32 | + run: | |
| 33 | + flake8 |
| 34 | + - name: Testing |
| 35 | + run: | |
| 36 | + python setup.py test |
| 37 | + sonar: |
| 38 | + name: Quality Analysis by sonar |
| 39 | + needs: [build] |
| 40 | + runs-on: ubuntu-latest |
| 41 | + steps: |
| 42 | + - name: Checkout project |
| 43 | + uses: actions/checkout@v2 |
19 | 44 | with:
|
20 | 45 | fetch-depth: 0
|
21 |
| - - name: Set up Python ${{ matrix.python-version }} |
| 46 | + - name: Set up Python 3.10 |
22 | 47 | uses: actions/setup-python@v2
|
23 | 48 | with:
|
24 |
| - python-version: ${{ matrix.python-version }} |
| 49 | + python-version: '3.10' |
25 | 50 | - name: Install dependencies
|
26 | 51 | run: |
|
27 | 52 | pip install -r requirements/dev.txt
|
28 | 53 | pip install -r requirements/test.txt
|
29 |
| - - name: Linting |
30 |
| - run: | |
31 |
| - flake8 |
32 | 54 | - name: Testing
|
33 | 55 | run: |
|
34 | 56 | python setup.py test
|
|
49 | 71 | - name: Wait sonar to process report
|
50 | 72 | uses: jakejarvis/wait-action@master
|
51 | 73 | with:
|
52 |
| - time: '120s' |
| 74 | + time: '15s' |
53 | 75 | - name: SonarQube Quality Gate check
|
54 | 76 | uses: sonarsource/sonarqube-quality-gate-action@master
|
55 | 77 | timeout-minutes: 5
|
|
0 commit comments