olofvndrhr
01a56734f2
All checks were successful
check code / check-docs (push) Successful in 7s
check code / check-code-py38 (push) Successful in 7m6s
check code / check-code-py39 (push) Successful in 7m7s
check code / check-code-py310 (push) Successful in 7m8s
check code / check-code-py311 (push) Successful in 6m52s
check code / scan-code-py311 (push) Successful in 7m2s
118 lines
2.5 KiB
YAML
118 lines
2.5 KiB
YAML
name: check code
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
|
|
pull_request:
|
|
branches: [main, master]
|
|
|
|
jobs:
|
|
check-docs:
|
|
runs-on: python311
|
|
steps:
|
|
- name: checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: "build docs"
|
|
run: |
|
|
python3 -m pip install mkdocs
|
|
cd docs || exit 1
|
|
mkdocs build --strict
|
|
|
|
scan-code-py311:
|
|
runs-on: python311
|
|
if: gitea.event_name != 'pull_request'
|
|
needs: [check-code-py311]
|
|
steps:
|
|
- name: checkout code
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: install hatch
|
|
run: pip install -U hatch
|
|
|
|
- name: get coverage (hatch)
|
|
run: hatch run default:cov
|
|
|
|
- name: run sonar-scanner
|
|
uses: sonarsource/sonarqube-scan-action@v2.0.1
|
|
env:
|
|
SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST }}
|
|
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
|
|
|
|
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 +py=3.8 lint:style
|
|
|
|
- name: test typing
|
|
run: hatch run +py=3.8 lint:typing
|
|
|
|
- name: run tests
|
|
run: hatch run default:test
|
|
|
|
check-code-py39:
|
|
runs-on: python39
|
|
needs: [check-code-py38]
|
|
steps:
|
|
- name: checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: install hatch
|
|
run: pip install -U hatch
|
|
|
|
- name: test codestyle
|
|
run: hatch run +py=3.9 lint:style
|
|
|
|
- name: test typing
|
|
run: hatch run +py=3.9 lint:typing
|
|
|
|
- name: run tests
|
|
run: hatch run default:test
|
|
|
|
check-code-py310:
|
|
runs-on: python310
|
|
needs: [check-code-py39]
|
|
steps:
|
|
- name: checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: install hatch
|
|
run: pip install -U hatch
|
|
|
|
- name: test codestyle
|
|
run: hatch run +py=3.10 lint:style
|
|
|
|
- name: test typing
|
|
run: hatch run +py=3.10 lint:typing
|
|
|
|
- name: run tests
|
|
run: hatch run default:test
|
|
|
|
check-code-py311:
|
|
runs-on: python311
|
|
needs: [check-code-py310]
|
|
steps:
|
|
- name: checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: install hatch
|
|
run: pip install -U hatch
|
|
|
|
- name: test codestyle
|
|
run: hatch run +py=3.11 lint:style
|
|
|
|
- name: test typing
|
|
run: hatch run +py=3.11 lint:typing
|
|
|
|
- name: run tests
|
|
run: hatch run default:test
|