2024-02-01 13:59:45 +01:00
|
|
|
name: check code
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [main, master]
|
|
|
|
|
|
|
|
pull_request:
|
|
|
|
branches: [main, master]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
check-docs:
|
|
|
|
runs-on: python311
|
|
|
|
steps:
|
2024-02-01 14:37:21 +01:00
|
|
|
- name: checkout code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
2024-02-01 13:59:45 +01:00
|
|
|
- name: "build docs"
|
|
|
|
run: |
|
|
|
|
python3 -m pip install mkdocs
|
|
|
|
cd docs || exit 1
|
|
|
|
mkdocs build --strict
|
2024-02-01 14:22:25 +01:00
|
|
|
|
2024-02-01 15:43:04 +01:00
|
|
|
scan-code-py311:
|
|
|
|
runs-on: python311
|
|
|
|
if: gitea.event_name != 'pull_request'
|
2024-02-01 20:42:32 +01:00
|
|
|
needs: [check-code-py38]
|
2024-02-01 15:43:04 +01:00
|
|
|
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
|
2024-04-04 20:14:07 +02:00
|
|
|
uses: sonarsource/sonarqube-scan-action@v2.0.2
|
2024-02-01 15:43:04 +01:00
|
|
|
env:
|
|
|
|
SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST }}
|
|
|
|
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
|
|
|
|
|
2024-02-01 14:22:25 +01:00
|
|
|
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
|
2024-02-01 14:48:05 +01:00
|
|
|
run: hatch run +py=3.8 lint:style
|
2024-02-01 14:22:25 +01:00
|
|
|
|
|
|
|
- name: test typing
|
2024-02-01 14:48:05 +01:00
|
|
|
run: hatch run +py=3.8 lint:typing
|
2024-02-01 14:22:25 +01:00
|
|
|
|
|
|
|
- name: run tests
|
2024-02-01 20:44:48 +01:00
|
|
|
if: gitea.event_name == 'pull_request'
|
2024-02-01 14:22:25 +01:00
|
|
|
run: hatch run default:test
|
|
|
|
|
|
|
|
check-code-py39:
|
|
|
|
runs-on: python39
|
2024-02-01 16:02:22 +01:00
|
|
|
needs: [check-code-py38]
|
2024-02-01 14:22:25 +01:00
|
|
|
steps:
|
|
|
|
- name: checkout code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: install hatch
|
|
|
|
run: pip install -U hatch
|
|
|
|
|
|
|
|
- name: test codestyle
|
2024-02-01 14:48:05 +01:00
|
|
|
run: hatch run +py=3.9 lint:style
|
2024-02-01 14:22:25 +01:00
|
|
|
|
|
|
|
- name: test typing
|
2024-02-01 14:48:05 +01:00
|
|
|
run: hatch run +py=3.9 lint:typing
|
2024-02-01 14:22:25 +01:00
|
|
|
|
|
|
|
- name: run tests
|
2024-02-01 20:44:48 +01:00
|
|
|
if: gitea.event_name == 'pull_request'
|
2024-02-01 14:22:25 +01:00
|
|
|
run: hatch run default:test
|
|
|
|
|
|
|
|
check-code-py310:
|
|
|
|
runs-on: python310
|
2024-02-01 16:02:22 +01:00
|
|
|
needs: [check-code-py39]
|
2024-02-01 14:22:25 +01:00
|
|
|
steps:
|
|
|
|
- name: checkout code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: install hatch
|
|
|
|
run: pip install -U hatch
|
|
|
|
|
|
|
|
- name: test codestyle
|
2024-02-01 14:48:05 +01:00
|
|
|
run: hatch run +py=3.10 lint:style
|
|
|
|
|
|
|
|
- name: test typing
|
|
|
|
run: hatch run +py=3.10 lint:typing
|
|
|
|
|
|
|
|
- name: run tests
|
2024-02-01 20:44:48 +01:00
|
|
|
if: gitea.event_name == 'pull_request'
|
2024-02-01 14:48:05 +01:00
|
|
|
run: hatch run default:test
|
|
|
|
|
|
|
|
check-code-py311:
|
|
|
|
runs-on: python311
|
2024-02-01 16:02:22 +01:00
|
|
|
needs: [check-code-py310]
|
2024-02-01 14:48:05 +01:00
|
|
|
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
|
2024-02-01 14:22:25 +01:00
|
|
|
|
|
|
|
- name: test typing
|
2024-02-01 14:48:05 +01:00
|
|
|
run: hatch run +py=3.11 lint:typing
|
2024-02-01 14:22:25 +01:00
|
|
|
|
|
|
|
- name: run tests
|
2024-02-01 20:44:48 +01:00
|
|
|
if: gitea.event_name == 'pull_request'
|
2024-02-01 14:22:25 +01:00
|
|
|
run: hatch run default:test
|