|
1 |
| -name: GH |
| 1 | +name: PyCodeQualityAnalysis |
2 | 2 |
|
3 | 3 | on:
|
| 4 | + workflow_dispatch: |
4 | 5 | pull_request:
|
5 |
| - branches: '*' |
| 6 | + branches: [master] |
6 | 7 | push:
|
7 |
| - branches: 'master' |
8 |
| - tags: '*' |
| 8 | + branches: [master] |
9 | 9 |
|
10 | 10 | jobs:
|
11 |
| - CI: |
| 11 | + DevOps: |
12 | 12 | runs-on: ubuntu-latest
|
13 | 13 | strategy:
|
14 |
| - max-parallel: 8 |
| 14 | + fail-fast: true |
15 | 15 | matrix:
|
16 |
| - python-version: [3.5, 3.6, 3.7, 3.8, 3.9, 3.10] |
| 16 | + python-version: ["3.9", "3.10", "3.11"] |
17 | 17 | steps:
|
18 |
| - - uses: actions/checkout@v2 |
19 |
| - |
20 |
| - - name: Set up Python ${{ matrix.python-version }} |
21 |
| - uses: actions/setup-python@v2 |
22 |
| - with: |
23 |
| - python-version: ${{ matrix.python-version }} |
24 |
| - |
25 |
| - - name: Pip cache |
26 |
| - uses: actions/cache@v2 |
27 |
| - with: |
28 |
| - path: ~/.cache/pip |
29 |
| - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements/*.txt') }} |
30 |
| - restore-keys: | |
31 |
| - ${{ runner.os }}-pip- |
32 |
| - - name: Install dependencies |
33 |
| - run: pip install -e ".[test]" |
34 |
| - |
35 |
| - - name: Lint |
36 |
| - run: | |
37 |
| - isort --recursive --diff validators tests && isort --recursive --check-only validators tests |
38 |
| - flake8 validators tests |
39 |
| -
|
40 |
| - - name: Test |
41 |
| - run: py.test --doctest-glob="*.rst" --doctest-modules --ignore=setup.py |
| 18 | + #---------------------------------------------- |
| 19 | + # check-out repo and set-up python |
| 20 | + #---------------------------------------------- |
| 21 | + - name: Checkout repository |
| 22 | + uses: actions/checkout@v3 |
| 23 | + - name: Set up Python ${{ matrix.python-version }} |
| 24 | + # id: setup-python |
| 25 | + uses: actions/setup-python@v4 |
| 26 | + with: |
| 27 | + python-version: ${{ matrix.python-version }} |
| 28 | + #---------------------------------------------- |
| 29 | + # install & configure poetry |
| 30 | + #---------------------------------------------- |
| 31 | + - name: Install Poetry |
| 32 | + uses: snok/install-poetry@v1 |
| 33 | + with: |
| 34 | + version: 1.3.2 |
| 35 | + virtualenvs-create: true |
| 36 | + virtualenvs-in-project: true |
| 37 | + #---------------------------------------------- |
| 38 | + # load cached venv if cache exists |
| 39 | + #---------------------------------------------- |
| 40 | + # - name: Load cached venv |
| 41 | + # id: cached-poetry-dependencies |
| 42 | + # uses: actions/cache@v3 |
| 43 | + # with: |
| 44 | + # path: .venv |
| 45 | + # key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} |
| 46 | + #---------------------------------------------- |
| 47 | + # install dependencies if cache does not exist |
| 48 | + #---------------------------------------------- |
| 49 | + - name: Install dependencies |
| 50 | + # if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' |
| 51 | + run: poetry install --no-interaction --no-root |
| 52 | + #---------------------------------------------- |
| 53 | + # run test suite |
| 54 | + #---------------------------------------------- |
| 55 | + - name: Test |
| 56 | + run: | |
| 57 | + source .venv/bin/activate |
| 58 | + pytest tests/ |
0 commit comments