Files
backend/.gitea/workflows/on_main.yml
Michel Wilhelm 7b588edda6
Some checks failed
Build / Code quality (push) Failing after 25s
Sonar and gitea settings
2025-02-04 15:45:04 -03:00

37 lines
1.4 KiB
YAML

name: Build
on:
push:
branches:
- main
jobs:
quality:
name: Code quality
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.12.6'
- name: Install uv
run: pip install uv
- name: Install dependencies
env:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
run: uv sync --dev
- name: lint
run: make lint
- uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
# Send Slack notification on failure
- name: Notify Slack on failure
if: failure()
run: |
curl -X POST -H 'Content-type: application/json' --data '{"text":"*Erro na execução do workflow*\n\nOcorreu um erro durante a execução do workflow do GitHub Actions.\n\n*Detalhes do erro:*\n- Nome do job: ${{ github.job }}\n- Nome do workflow: ${{ github.workflow }}\n- Repositório: ${{ github.repository }}\n- Branch: ${{ github.ref }}\n- Commit: ${{ github.sha }}\n- Autor do commit: ${{ github.actor }}\n\nPor favor, verifique o log do workflow para mais detalhes."}' https://hooks.slack.com/services/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