feat(ci): fix CI, switch to self-hosted SonarQube (#310)
Reviewed-on: #310
This commit is contained in:
parent
7ce7783bb7
commit
46e2ee6408
@ -55,10 +55,11 @@ jobs:
|
|||||||
- name: Minimize uv cache
|
- name: Minimize uv cache
|
||||||
run: uv cache prune --ci
|
run: uv cache prune --ci
|
||||||
|
|
||||||
- name: SonarQube Cloud Scan
|
- name: SonarQube Scan
|
||||||
uses: SonarSource/sonarqube-scan-action@v4.2.1
|
uses: SonarSource/sonarqube-scan-action@v4.2.1
|
||||||
env:
|
env:
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST_URL }}
|
||||||
|
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
|
||||||
|
|
||||||
- name: Snyk Vulnerability Scan
|
- name: Snyk Vulnerability Scan
|
||||||
uses: snyk/actions/python@master
|
uses: snyk/actions/python@master
|
||||||
|
@ -5,18 +5,13 @@ on:
|
|||||||
- cron: "0 9 * * 0"
|
- cron: "0 9 * * 0"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# test:
|
test:
|
||||||
# name: Test
|
name: Test
|
||||||
# uses: https://git.tainton.uk/public/pypilot/.gitea/workflows/ci.yml@main
|
uses: https://git.tainton.uk/repos/pypilot/.gitea/workflows/ci.yml@main
|
||||||
# with:
|
|
||||||
# python-version: 3.13
|
|
||||||
# secrets:
|
|
||||||
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
||||||
# SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
|
|
||||||
|
|
||||||
create_release:
|
create_release:
|
||||||
name: Create Release
|
name: Create Release
|
||||||
# needs: test
|
needs: test
|
||||||
uses: https://git.tainton.uk/actions/gha-workflows/.gitea/workflows/create-release.yml@main
|
uses: https://git.tainton.uk/actions/gha-workflows/.gitea/workflows/create-release.yml@main
|
||||||
secrets:
|
secrets:
|
||||||
ACTIONS_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
|
ACTIONS_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
|
||||||
@ -51,8 +46,7 @@ jobs:
|
|||||||
- name: Setup Poetry
|
- name: Setup Poetry
|
||||||
uses: abatilo/actions-poetry@v4
|
uses: abatilo/actions-poetry@v4
|
||||||
- name: Update pyproject.toml
|
- name: Update pyproject.toml
|
||||||
run:
|
run: ./tools/update_pyproject.sh ${{ needs.create_release.outputs.release_name }}
|
||||||
./tools/update_pyproject.sh ${{ needs.create_release.outputs.release_name }}
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: poetry install
|
run: poetry install
|
||||||
- name: Build wheel file
|
- name: Build wheel file
|
||||||
|
34
.gitea/workflows/security.yml
Normal file
34
.gitea/workflows/security.yml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
name: Security
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
schedule:
|
||||||
|
- cron: "@daily"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
sonarqube:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v4.2.2
|
||||||
|
|
||||||
|
- name: SonarQube Scan
|
||||||
|
uses: SonarSource/sonarqube-scan-action@v4.2.1
|
||||||
|
env:
|
||||||
|
SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST_URL }}
|
||||||
|
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
|
||||||
|
|
||||||
|
snyk:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v4.2.2
|
||||||
|
|
||||||
|
- name: Snyk
|
||||||
|
uses: snyk/actions/python@master
|
||||||
|
continue-on-error: true
|
||||||
|
env:
|
||||||
|
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -9,6 +9,7 @@ __pycache__/
|
|||||||
# Distribution / packaging
|
# Distribution / packaging
|
||||||
.Python
|
.Python
|
||||||
build/
|
build/
|
||||||
|
.pdm-build/
|
||||||
develop-eggs/
|
develop-eggs/
|
||||||
dist/
|
dist/
|
||||||
downloads/
|
downloads/
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
sonar.organization=luketainton
|
sonar.projectKey=pypilot
|
||||||
sonar.projectKey=luketainton_pypilot2
|
|
||||||
sonar.projectName=pypilot
|
sonar.projectName=pypilot
|
||||||
sonar.projectVersion=1.0
|
sonar.python.version=3.13
|
||||||
sonar.python.version=3.10
|
|
||||||
sonar.python.coverage.reportPaths=coverage.xml
|
sonar.python.coverage.reportPaths=coverage.xml
|
||||||
sonar.python.pylint.reportPaths=lintreport.txt
|
sonar.python.pylint.reportPaths=lintreport.txt
|
||||||
sonar.python.xunit.reportPath=testresults.xml
|
sonar.python.xunit.reportPath=testresults.xml
|
||||||
sonar.sources=app
|
sonar.sources=Dockerfile,app
|
||||||
sonar.tests=tests
|
sonar.tests=tests
|
||||||
sonar.exclusions=,.github/**,.gitignore,CODEOWNERS,CHANGELOG.md,LICENSE.md,README.md,renovate.json,requirements-dev.txt,requirements.txt
|
sonar.exclusions=,.archive/**,.gitea/**,.gitignore,renovate.json
|
||||||
sonar.coverage.exclusions=app/_version.py,app/args.py,app/main.py
|
sonar.coverage.exclusions=app/_version.py,app/args.py,app/main.py
|
||||||
|
Loading…
x
Reference in New Issue
Block a user