This commit is contained in:
Meghdad committed 2026-07-23 06:40:30 +03:30
1 parent 26d41cd03f
commit db57e0e4a2
30 files changed
+1757

No files matched your search

+45
View File
@@ -0,0 +1,45 @@
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
quality-and-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- run: pip install -e '.[dev]'
- name: Ruff
run: ruff check . && ruff format --check .
- name: Mypy
run: mypy src
- name: Unit and integration tests
run: pytest --cov-report=xml
- uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage.xml
container:
runs-on: ubuntu-latest
needs: quality-and-tests
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v6
with:
context: .
push: false
tags: warehouse-allocation:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
+28
View File
@@ -0,0 +1,28 @@
name: SonarQube
on:
workflow_dispatch:
push:
branches: [main]
permissions:
contents: read
jobs:
scan:
if: ${{ vars.SONAR_HOST_URL != '' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install -e '.[dev]' && pytest --cov-report=xml
- uses: SonarSource/sonarqube-scan-action@v5
with:
args: -Dsonar.qualitygate.wait=true
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}