53 lines
1.1 KiB
YAML
53 lines
1.1 KiB
YAML
name: CI - Validacao Go
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- maintained-develop
|
|
- maintained-stable
|
|
- 'fix/*'
|
|
- 'maintenance/*'
|
|
pull_request:
|
|
branches:
|
|
- maintained-develop
|
|
- maintained-stable
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ci-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
validate:
|
|
name: Validar Codigo e Testes
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout do Repositorio
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Configurar Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: Instalar Dependencias de Sistema
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y --no-install-recommends libjpeg-dev libwebp-dev poppler-utils ffmpeg
|
|
|
|
- name: Verificar Integridade das Dependencias
|
|
run: go mod verify
|
|
|
|
- name: Compilar Codigo
|
|
run: go build ./...
|
|
|
|
- name: Analise Estatica (Go Vet)
|
|
run: go vet ./...
|
|
|
|
- name: Executar Testes Unitarios
|
|
run: go test -v ./...
|