This commit is contained in:
36
.gitea/workflows/on_main.yml
Normal file
36
.gitea/workflows/on_main.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
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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
|
||||
Reference in New Issue
Block a user