| 1 |
name: Linters |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: [ "master" ] |
| 6 |
pull_request: |
| 7 |
branches: [ "master" ] |
| 8 |
|
| 9 |
jobs: |
| 10 |
build: |
| 11 |
runs-on: ubuntu-latest |
| 12 |
strategy: |
| 13 |
max-parallel: 4 |
| 14 |
matrix: |
| 15 |
python-version: ["3.10"] |
| 16 |
|
| 17 |
steps: |
| 18 |
- uses: actions/checkout@v3 |
| 19 |
- name: Set up Python ${{ matrix.python-version }} |
| 20 |
uses: actions/setup-python@v3 |
| 21 |
with: |
| 22 |
python-version: ${{ matrix.python-version }} |
| 23 |
- name: Install Dependencies |
| 24 |
run: | |
| 25 |
python -m pip install --upgrade pip wheel |
| 26 |
pip install -r requirements-test.txt -e . |
| 27 |
- name: Run Tests |
| 28 |
run: | |
| 29 |
pytest --cov=aptly_api |
| 30 |
coverage report -m |
| 31 |
coverage lcov |
| 32 |
- name: Run Coveralls |
| 33 |
uses: coverallsapp/github-action@master |
| 34 |
with: |
| 35 |
github-token: ${{ secrets.GITHUB_TOKEN }} |
| 36 |
path-to-lcov: coverage.lcov |
| 37 |
- name: Run Flake8 |
| 38 |
run: | |
| 39 |
flake8 --max-line-length=120 aptly_api setup.py |
| 40 |
- name: Run mypy |
| 41 |
run: | |
| 42 |
mypy --install-types --non-interactive \ |
| 43 |
--ignore-missing-imports --follow-imports=skip --disallow-untyped-calls \ |
| 44 |
--disallow-untyped-defs -p aptly_api |