- Automated linting with rustfmt and clippy - Automated building and testing - Automated Docker image builds - Clippy and rustfmt configuration files
73 lines
1,015 B
Markdown
73 lines
1,015 B
Markdown
# Forgejo CI/CD Pipeline
|
|
|
|
## Status: ✅ Implemented
|
|
|
|
**Date**: 2026-02-15 19:55:00 UTC
|
|
|
|
---
|
|
|
|
## Pipeline Stages
|
|
|
|
### 1. Lint Job
|
|
- Check code formatting with rustfmt
|
|
- Run clippy linter with strict rules
|
|
|
|
### 2. Build Job
|
|
- Build all targets with cargo
|
|
- Run all tests
|
|
|
|
### 3. Docker Build Job
|
|
- Build production Docker image
|
|
- Build development Docker image
|
|
|
|
---
|
|
|
|
## Trigger Events
|
|
|
|
- Push to main branch
|
|
- Push to develop branch
|
|
- Pull requests to main/develop
|
|
|
|
---
|
|
|
|
## Configuration Files
|
|
|
|
- .forgejo/workflows/lint-and-build.yml
|
|
- backend/clippy.toml
|
|
- backend/rustfmt.toml
|
|
|
|
---
|
|
|
|
## Running Locally
|
|
|
|
### Check formatting
|
|
```bash
|
|
cd backend
|
|
cargo fmt --all -- --check
|
|
cargo fmt --all # to fix
|
|
```
|
|
|
|
### Run clippy
|
|
```bash
|
|
cd backend
|
|
cargo clippy --all-targets --all-features -- -D warnings
|
|
```
|
|
|
|
### Build
|
|
```bash
|
|
cd backend
|
|
cargo build --verbose
|
|
```
|
|
|
|
### Run tests
|
|
```bash
|
|
cd backend
|
|
cargo test --verbose
|
|
```
|
|
|
|
---
|
|
|
|
## Viewing Results
|
|
|
|
After pushing, go to:
|
|
http://gitea.soliverez.com.ar/alvaro/normogen/actions
|