manga-dlp/.gitea/workflows/check_code.yml

87 lines
1.8 KiB
YAML

name: check code
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
check-code-py311:
uses: actions/workflows/.gitea/workflows/check_python_hatch.yml@master
with:
run-tests: true
scan-code-py311:
uses: actions/workflows/.gitea/workflows/sonarqube_python.yml@master
needs: [check-code]
if: gitea.event_name != 'pull_request'
with:
run-coverage: true
secrets:
sonar-host: ${{ secrets.SONARQUBE_HOST }}
sonar-token: ${{ secrets.SONARQUBE_TOKEN }}
check-docs:
runs-on: python311
steps:
- name: "build docs"
run: |
python3 -m pip install mkdocs
cd docs || exit 1
mkdocs build --strict
check-code-py38:
runs-on: python38
steps:
- name: checkout code
uses: actions/checkout@v3
- name: install hatch
run: pip install -U hatch
- name: test codestyle
run: hatch run lint:style
- name: test typing
run: hatch run lint:typing
- name: run tests
run: hatch run default:test
check-code-py39:
runs-on: python39
steps:
- name: checkout code
uses: actions/checkout@v3
- name: install hatch
run: pip install -U hatch
- name: test codestyle
run: hatch run lint:style
- name: test typing
run: hatch run lint:typing
- name: run tests
run: hatch run default:test
check-code-py310:
runs-on: python310
steps:
- name: checkout code
uses: actions/checkout@v3
- name: install hatch
run: pip install -U hatch
- name: test codestyle
run: hatch run lint:style
- name: test typing
run: hatch run lint:typing
- name: run tests
run: hatch run default:test